14260: secret_mounts works with runtime_token (really this time)
[arvados.git] / services / api / db / structure.sql
1 -- Copyright (C) The Arvados Authors. All rights reserved.
2 --
3 -- SPDX-License-Identifier: AGPL-3.0
4
5 SET statement_timeout = 0;
6 SET client_encoding = 'UTF8';
7 SET standard_conforming_strings = on;
8 SELECT pg_catalog.set_config('search_path', '', false);
9 SET check_function_bodies = false;
10 SET client_min_messages = warning;
11
12 --
13 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
14 --
15
16 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
17
18
19 --
20 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
21 --
22
23 -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
24
25
26 SET default_tablespace = '';
27
28 SET default_with_oids = false;
29
30 --
31 -- Name: api_client_authorizations; Type: TABLE; Schema: public; Owner: -
32 --
33
34 CREATE TABLE public.api_client_authorizations (
35     id integer NOT NULL,
36     api_token character varying(255) NOT NULL,
37     api_client_id integer NOT NULL,
38     user_id integer NOT NULL,
39     created_by_ip_address character varying(255),
40     last_used_by_ip_address character varying(255),
41     last_used_at timestamp without time zone,
42     expires_at timestamp without time zone,
43     created_at timestamp without time zone NOT NULL,
44     updated_at timestamp without time zone NOT NULL,
45     default_owner_uuid character varying(255),
46     scopes text DEFAULT '["all"]'::text,
47     uuid character varying(255) NOT NULL
48 );
49
50
51 --
52 -- Name: api_client_authorizations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
53 --
54
55 CREATE SEQUENCE public.api_client_authorizations_id_seq
56     START WITH 1
57     INCREMENT BY 1
58     NO MINVALUE
59     NO MAXVALUE
60     CACHE 1;
61
62
63 --
64 -- Name: api_client_authorizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
65 --
66
67 ALTER SEQUENCE public.api_client_authorizations_id_seq OWNED BY public.api_client_authorizations.id;
68
69
70 --
71 -- Name: api_clients; Type: TABLE; Schema: public; Owner: -
72 --
73
74 CREATE TABLE public.api_clients (
75     id integer NOT NULL,
76     uuid character varying(255),
77     owner_uuid character varying(255),
78     modified_by_client_uuid character varying(255),
79     modified_by_user_uuid character varying(255),
80     modified_at timestamp without time zone,
81     name character varying(255),
82     url_prefix character varying(255),
83     created_at timestamp without time zone NOT NULL,
84     updated_at timestamp without time zone NOT NULL,
85     is_trusted boolean DEFAULT false
86 );
87
88
89 --
90 -- Name: api_clients_id_seq; Type: SEQUENCE; Schema: public; Owner: -
91 --
92
93 CREATE SEQUENCE public.api_clients_id_seq
94     START WITH 1
95     INCREMENT BY 1
96     NO MINVALUE
97     NO MAXVALUE
98     CACHE 1;
99
100
101 --
102 -- Name: api_clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
103 --
104
105 ALTER SEQUENCE public.api_clients_id_seq OWNED BY public.api_clients.id;
106
107
108 --
109 -- Name: authorized_keys; Type: TABLE; Schema: public; Owner: -
110 --
111
112 CREATE TABLE public.authorized_keys (
113     id integer NOT NULL,
114     uuid character varying(255) NOT NULL,
115     owner_uuid character varying(255) NOT NULL,
116     modified_by_client_uuid character varying(255),
117     modified_by_user_uuid character varying(255),
118     modified_at timestamp without time zone,
119     name character varying(255),
120     key_type character varying(255),
121     authorized_user_uuid character varying(255),
122     public_key text,
123     expires_at timestamp without time zone,
124     created_at timestamp without time zone NOT NULL,
125     updated_at timestamp without time zone NOT NULL
126 );
127
128
129 --
130 -- Name: authorized_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
131 --
132
133 CREATE SEQUENCE public.authorized_keys_id_seq
134     START WITH 1
135     INCREMENT BY 1
136     NO MINVALUE
137     NO MAXVALUE
138     CACHE 1;
139
140
141 --
142 -- Name: authorized_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
143 --
144
145 ALTER SEQUENCE public.authorized_keys_id_seq OWNED BY public.authorized_keys.id;
146
147
148 --
149 -- Name: collections; Type: TABLE; Schema: public; Owner: -
150 --
151
152 CREATE TABLE public.collections (
153     id integer NOT NULL,
154     owner_uuid character varying(255),
155     created_at timestamp without time zone NOT NULL,
156     modified_by_client_uuid character varying(255),
157     modified_by_user_uuid character varying(255),
158     modified_at timestamp without time zone,
159     portable_data_hash character varying(255),
160     replication_desired integer,
161     replication_confirmed_at timestamp without time zone,
162     replication_confirmed integer,
163     updated_at timestamp without time zone NOT NULL,
164     uuid character varying(255),
165     manifest_text text,
166     name character varying(255),
167     description character varying(524288),
168     properties jsonb,
169     delete_at timestamp without time zone,
170     file_names text,
171     trash_at timestamp without time zone,
172     is_trashed boolean DEFAULT false NOT NULL,
173     storage_classes_desired jsonb DEFAULT '["default"]'::jsonb,
174     storage_classes_confirmed jsonb DEFAULT '[]'::jsonb,
175     storage_classes_confirmed_at timestamp without time zone
176 );
177
178
179 --
180 -- Name: collections_id_seq; Type: SEQUENCE; Schema: public; Owner: -
181 --
182
183 CREATE SEQUENCE public.collections_id_seq
184     START WITH 1
185     INCREMENT BY 1
186     NO MINVALUE
187     NO MAXVALUE
188     CACHE 1;
189
190
191 --
192 -- Name: collections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
193 --
194
195 ALTER SEQUENCE public.collections_id_seq OWNED BY public.collections.id;
196
197
198 --
199 -- Name: commit_ancestors; Type: TABLE; Schema: public; Owner: -
200 --
201
202 CREATE TABLE public.commit_ancestors (
203     id integer NOT NULL,
204     repository_name character varying(255),
205     descendant character varying(255) NOT NULL,
206     ancestor character varying(255) NOT NULL,
207     "is" boolean DEFAULT false NOT NULL,
208     created_at timestamp without time zone NOT NULL,
209     updated_at timestamp without time zone NOT NULL
210 );
211
212
213 --
214 -- Name: commit_ancestors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
215 --
216
217 CREATE SEQUENCE public.commit_ancestors_id_seq
218     START WITH 1
219     INCREMENT BY 1
220     NO MINVALUE
221     NO MAXVALUE
222     CACHE 1;
223
224
225 --
226 -- Name: commit_ancestors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
227 --
228
229 ALTER SEQUENCE public.commit_ancestors_id_seq OWNED BY public.commit_ancestors.id;
230
231
232 --
233 -- Name: commits; Type: TABLE; Schema: public; Owner: -
234 --
235
236 CREATE TABLE public.commits (
237     id integer NOT NULL,
238     repository_name character varying(255),
239     sha1 character varying(255),
240     message character varying(255),
241     created_at timestamp without time zone NOT NULL,
242     updated_at timestamp without time zone NOT NULL
243 );
244
245
246 --
247 -- Name: commits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
248 --
249
250 CREATE SEQUENCE public.commits_id_seq
251     START WITH 1
252     INCREMENT BY 1
253     NO MINVALUE
254     NO MAXVALUE
255     CACHE 1;
256
257
258 --
259 -- Name: commits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
260 --
261
262 ALTER SEQUENCE public.commits_id_seq OWNED BY public.commits.id;
263
264
265 --
266 -- Name: container_requests; Type: TABLE; Schema: public; Owner: -
267 --
268
269 CREATE TABLE public.container_requests (
270     id integer NOT NULL,
271     uuid character varying(255),
272     owner_uuid character varying(255),
273     created_at timestamp without time zone NOT NULL,
274     modified_at timestamp without time zone,
275     modified_by_client_uuid character varying(255),
276     modified_by_user_uuid character varying(255),
277     name character varying(255),
278     description text,
279     properties jsonb,
280     state character varying(255),
281     requesting_container_uuid character varying(255),
282     container_uuid character varying(255),
283     container_count_max integer,
284     mounts text,
285     runtime_constraints text,
286     container_image character varying(255),
287     environment text,
288     cwd character varying(255),
289     command text,
290     output_path character varying(255),
291     priority integer,
292     expires_at timestamp without time zone,
293     filters text,
294     updated_at timestamp without time zone NOT NULL,
295     container_count integer DEFAULT 0,
296     use_existing boolean DEFAULT true,
297     scheduling_parameters text,
298     output_uuid character varying(255),
299     log_uuid character varying(255),
300     output_name character varying(255) DEFAULT NULL::character varying,
301     output_ttl integer DEFAULT 0 NOT NULL,
302     secret_mounts jsonb DEFAULT '{}'::jsonb,
303     runtime_token text
304 );
305
306
307 --
308 -- Name: container_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
309 --
310
311 CREATE SEQUENCE public.container_requests_id_seq
312     START WITH 1
313     INCREMENT BY 1
314     NO MINVALUE
315     NO MAXVALUE
316     CACHE 1;
317
318
319 --
320 -- Name: container_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
321 --
322
323 ALTER SEQUENCE public.container_requests_id_seq OWNED BY public.container_requests.id;
324
325
326 --
327 -- Name: containers; Type: TABLE; Schema: public; Owner: -
328 --
329
330 CREATE TABLE public.containers (
331     id integer NOT NULL,
332     uuid character varying(255),
333     owner_uuid character varying(255),
334     created_at timestamp without time zone NOT NULL,
335     modified_at timestamp without time zone,
336     modified_by_client_uuid character varying(255),
337     modified_by_user_uuid character varying(255),
338     state character varying(255),
339     started_at timestamp without time zone,
340     finished_at timestamp without time zone,
341     log character varying(255),
342     environment text,
343     cwd character varying(255),
344     command text,
345     output_path character varying(255),
346     mounts text,
347     runtime_constraints text,
348     output character varying(255),
349     container_image character varying(255),
350     progress double precision,
351     priority bigint,
352     updated_at timestamp without time zone NOT NULL,
353     exit_code integer,
354     auth_uuid character varying(255),
355     locked_by_uuid character varying(255),
356     scheduling_parameters text,
357     secret_mounts jsonb DEFAULT '{}'::jsonb,
358     secret_mounts_md5 character varying DEFAULT '99914b932bd37a50b983c5e7c90ae93b'::character varying,
359     runtime_status jsonb DEFAULT '{}'::jsonb,
360     runtime_user_uuid text,
361     runtime_auth_scopes jsonb,
362     runtime_token text
363 );
364
365
366 --
367 -- Name: containers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
368 --
369
370 CREATE SEQUENCE public.containers_id_seq
371     START WITH 1
372     INCREMENT BY 1
373     NO MINVALUE
374     NO MAXVALUE
375     CACHE 1;
376
377
378 --
379 -- Name: containers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
380 --
381
382 ALTER SEQUENCE public.containers_id_seq OWNED BY public.containers.id;
383
384
385 --
386 -- Name: groups; Type: TABLE; Schema: public; Owner: -
387 --
388
389 CREATE TABLE public.groups (
390     id integer NOT NULL,
391     uuid character varying(255),
392     owner_uuid character varying(255),
393     created_at timestamp without time zone NOT NULL,
394     modified_by_client_uuid character varying(255),
395     modified_by_user_uuid character varying(255),
396     modified_at timestamp without time zone,
397     name character varying(255) NOT NULL,
398     description character varying(524288),
399     updated_at timestamp without time zone NOT NULL,
400     group_class character varying(255),
401     trash_at timestamp without time zone,
402     is_trashed boolean DEFAULT false NOT NULL,
403     delete_at timestamp without time zone,
404     properties jsonb DEFAULT '{}'::jsonb
405 );
406
407
408 --
409 -- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
410 --
411
412 CREATE SEQUENCE public.groups_id_seq
413     START WITH 1
414     INCREMENT BY 1
415     NO MINVALUE
416     NO MAXVALUE
417     CACHE 1;
418
419
420 --
421 -- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
422 --
423
424 ALTER SEQUENCE public.groups_id_seq OWNED BY public.groups.id;
425
426
427 --
428 -- Name: humans; Type: TABLE; Schema: public; Owner: -
429 --
430
431 CREATE TABLE public.humans (
432     id integer NOT NULL,
433     uuid character varying(255) NOT NULL,
434     owner_uuid character varying(255) NOT NULL,
435     modified_by_client_uuid character varying(255),
436     modified_by_user_uuid character varying(255),
437     modified_at timestamp without time zone,
438     properties text,
439     created_at timestamp without time zone NOT NULL,
440     updated_at timestamp without time zone NOT NULL
441 );
442
443
444 --
445 -- Name: humans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
446 --
447
448 CREATE SEQUENCE public.humans_id_seq
449     START WITH 1
450     INCREMENT BY 1
451     NO MINVALUE
452     NO MAXVALUE
453     CACHE 1;
454
455
456 --
457 -- Name: humans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
458 --
459
460 ALTER SEQUENCE public.humans_id_seq OWNED BY public.humans.id;
461
462
463 --
464 -- Name: job_tasks; Type: TABLE; Schema: public; Owner: -
465 --
466
467 CREATE TABLE public.job_tasks (
468     id integer NOT NULL,
469     uuid character varying(255),
470     owner_uuid character varying(255),
471     modified_by_client_uuid character varying(255),
472     modified_by_user_uuid character varying(255),
473     modified_at timestamp without time zone,
474     job_uuid character varying(255),
475     sequence integer,
476     parameters text,
477     output text,
478     progress double precision,
479     success boolean,
480     created_at timestamp without time zone NOT NULL,
481     updated_at timestamp without time zone NOT NULL,
482     created_by_job_task_uuid character varying(255),
483     qsequence bigint,
484     started_at timestamp without time zone,
485     finished_at timestamp without time zone
486 );
487
488
489 --
490 -- Name: job_tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
491 --
492
493 CREATE SEQUENCE public.job_tasks_id_seq
494     START WITH 1
495     INCREMENT BY 1
496     NO MINVALUE
497     NO MAXVALUE
498     CACHE 1;
499
500
501 --
502 -- Name: job_tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
503 --
504
505 ALTER SEQUENCE public.job_tasks_id_seq OWNED BY public.job_tasks.id;
506
507
508 --
509 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE; Schema: public; Owner: -
510 --
511
512 CREATE SEQUENCE public.job_tasks_qsequence_seq
513     START WITH 1
514     INCREMENT BY 1
515     NO MINVALUE
516     NO MAXVALUE
517     CACHE 1;
518
519
520 --
521 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
522 --
523
524 ALTER SEQUENCE public.job_tasks_qsequence_seq OWNED BY public.job_tasks.qsequence;
525
526
527 --
528 -- Name: jobs; Type: TABLE; Schema: public; Owner: -
529 --
530
531 CREATE TABLE public.jobs (
532     id integer NOT NULL,
533     uuid character varying(255),
534     owner_uuid character varying(255),
535     modified_by_client_uuid character varying(255),
536     modified_by_user_uuid character varying(255),
537     modified_at timestamp without time zone,
538     submit_id character varying(255),
539     script character varying(255),
540     script_version character varying(255),
541     script_parameters text,
542     cancelled_by_client_uuid character varying(255),
543     cancelled_by_user_uuid character varying(255),
544     cancelled_at timestamp without time zone,
545     started_at timestamp without time zone,
546     finished_at timestamp without time zone,
547     running boolean,
548     success boolean,
549     output character varying(255),
550     created_at timestamp without time zone NOT NULL,
551     updated_at timestamp without time zone NOT NULL,
552     is_locked_by_uuid character varying(255),
553     log character varying(255),
554     tasks_summary text,
555     runtime_constraints text,
556     nondeterministic boolean,
557     repository character varying(255),
558     supplied_script_version character varying(255),
559     docker_image_locator character varying(255),
560     priority integer DEFAULT 0 NOT NULL,
561     description character varying(524288),
562     state character varying(255),
563     arvados_sdk_version character varying(255),
564     components text,
565     script_parameters_digest character varying(255)
566 );
567
568
569 --
570 -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
571 --
572
573 CREATE SEQUENCE public.jobs_id_seq
574     START WITH 1
575     INCREMENT BY 1
576     NO MINVALUE
577     NO MAXVALUE
578     CACHE 1;
579
580
581 --
582 -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
583 --
584
585 ALTER SEQUENCE public.jobs_id_seq OWNED BY public.jobs.id;
586
587
588 --
589 -- Name: keep_disks; Type: TABLE; Schema: public; Owner: -
590 --
591
592 CREATE TABLE public.keep_disks (
593     id integer NOT NULL,
594     uuid character varying(255) NOT NULL,
595     owner_uuid character varying(255) NOT NULL,
596     modified_by_client_uuid character varying(255),
597     modified_by_user_uuid character varying(255),
598     modified_at timestamp without time zone,
599     ping_secret character varying(255) NOT NULL,
600     node_uuid character varying(255),
601     filesystem_uuid character varying(255),
602     bytes_total integer,
603     bytes_free integer,
604     is_readable boolean DEFAULT true NOT NULL,
605     is_writable boolean DEFAULT true NOT NULL,
606     last_read_at timestamp without time zone,
607     last_write_at timestamp without time zone,
608     last_ping_at timestamp without time zone,
609     created_at timestamp without time zone NOT NULL,
610     updated_at timestamp without time zone NOT NULL,
611     keep_service_uuid character varying(255)
612 );
613
614
615 --
616 -- Name: keep_disks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
617 --
618
619 CREATE SEQUENCE public.keep_disks_id_seq
620     START WITH 1
621     INCREMENT BY 1
622     NO MINVALUE
623     NO MAXVALUE
624     CACHE 1;
625
626
627 --
628 -- Name: keep_disks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
629 --
630
631 ALTER SEQUENCE public.keep_disks_id_seq OWNED BY public.keep_disks.id;
632
633
634 --
635 -- Name: keep_services; Type: TABLE; Schema: public; Owner: -
636 --
637
638 CREATE TABLE public.keep_services (
639     id integer NOT NULL,
640     uuid character varying(255) NOT NULL,
641     owner_uuid character varying(255) NOT NULL,
642     modified_by_client_uuid character varying(255),
643     modified_by_user_uuid character varying(255),
644     modified_at timestamp without time zone,
645     service_host character varying(255),
646     service_port integer,
647     service_ssl_flag boolean,
648     service_type character varying(255),
649     created_at timestamp without time zone NOT NULL,
650     updated_at timestamp without time zone NOT NULL,
651     read_only boolean DEFAULT false NOT NULL
652 );
653
654
655 --
656 -- Name: keep_services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
657 --
658
659 CREATE SEQUENCE public.keep_services_id_seq
660     START WITH 1
661     INCREMENT BY 1
662     NO MINVALUE
663     NO MAXVALUE
664     CACHE 1;
665
666
667 --
668 -- Name: keep_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
669 --
670
671 ALTER SEQUENCE public.keep_services_id_seq OWNED BY public.keep_services.id;
672
673
674 --
675 -- Name: links; Type: TABLE; Schema: public; Owner: -
676 --
677
678 CREATE TABLE public.links (
679     id integer NOT NULL,
680     uuid character varying(255),
681     owner_uuid character varying(255),
682     created_at timestamp without time zone NOT NULL,
683     modified_by_client_uuid character varying(255),
684     modified_by_user_uuid character varying(255),
685     modified_at timestamp without time zone,
686     tail_uuid character varying(255),
687     link_class character varying(255),
688     name character varying(255),
689     head_uuid character varying(255),
690     properties jsonb,
691     updated_at timestamp without time zone NOT NULL
692 );
693
694
695 --
696 -- Name: links_id_seq; Type: SEQUENCE; Schema: public; Owner: -
697 --
698
699 CREATE SEQUENCE public.links_id_seq
700     START WITH 1
701     INCREMENT BY 1
702     NO MINVALUE
703     NO MAXVALUE
704     CACHE 1;
705
706
707 --
708 -- Name: links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
709 --
710
711 ALTER SEQUENCE public.links_id_seq OWNED BY public.links.id;
712
713
714 --
715 -- Name: logs; Type: TABLE; Schema: public; Owner: -
716 --
717
718 CREATE TABLE public.logs (
719     id integer NOT NULL,
720     uuid character varying(255),
721     owner_uuid character varying(255),
722     modified_by_client_uuid character varying(255),
723     modified_by_user_uuid character varying(255),
724     object_uuid character varying(255),
725     event_at timestamp without time zone,
726     event_type character varying(255),
727     summary text,
728     properties text,
729     created_at timestamp without time zone NOT NULL,
730     updated_at timestamp without time zone NOT NULL,
731     modified_at timestamp without time zone,
732     object_owner_uuid character varying(255)
733 );
734
735
736 --
737 -- Name: logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
738 --
739
740 CREATE SEQUENCE public.logs_id_seq
741     START WITH 1
742     INCREMENT BY 1
743     NO MINVALUE
744     NO MAXVALUE
745     CACHE 1;
746
747
748 --
749 -- Name: logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
750 --
751
752 ALTER SEQUENCE public.logs_id_seq OWNED BY public.logs.id;
753
754
755 --
756 -- Name: users; Type: TABLE; Schema: public; Owner: -
757 --
758
759 CREATE TABLE public.users (
760     id integer NOT NULL,
761     uuid character varying(255),
762     owner_uuid character varying(255) NOT NULL,
763     created_at timestamp without time zone NOT NULL,
764     modified_by_client_uuid character varying(255),
765     modified_by_user_uuid character varying(255),
766     modified_at timestamp without time zone,
767     email character varying(255),
768     first_name character varying(255),
769     last_name character varying(255),
770     identity_url character varying(255),
771     is_admin boolean,
772     prefs text,
773     updated_at timestamp without time zone NOT NULL,
774     default_owner_uuid character varying(255),
775     is_active boolean DEFAULT false,
776     username character varying(255),
777     redirect_to_user_uuid character varying
778 );
779
780
781 --
782 -- Name: materialized_permission_view; Type: MATERIALIZED VIEW; Schema: public; Owner: -
783 --
784
785 CREATE MATERIALIZED VIEW public.materialized_permission_view AS
786  WITH RECURSIVE perm_value(name, val) AS (
787          VALUES ('can_read'::text,(1)::smallint), ('can_login'::text,1), ('can_write'::text,2), ('can_manage'::text,3)
788         ), perm_edges(tail_uuid, head_uuid, val, follow, trashed) AS (
789          SELECT links.tail_uuid,
790             links.head_uuid,
791             pv.val,
792             ((pv.val = 3) OR (groups.uuid IS NOT NULL)) AS follow,
793             (0)::smallint AS trashed,
794             (0)::smallint AS followtrash
795            FROM ((public.links
796              LEFT JOIN perm_value pv ON ((pv.name = (links.name)::text)))
797              LEFT JOIN public.groups ON (((pv.val < 3) AND ((groups.uuid)::text = (links.head_uuid)::text))))
798           WHERE ((links.link_class)::text = 'permission'::text)
799         UNION ALL
800          SELECT groups.owner_uuid,
801             groups.uuid,
802             3,
803             true AS bool,
804                 CASE
805                     WHEN ((groups.trash_at IS NOT NULL) AND (groups.trash_at < clock_timestamp())) THEN 1
806                     ELSE 0
807                 END AS "case",
808             1
809            FROM public.groups
810         ), perm(val, follow, user_uuid, target_uuid, trashed) AS (
811          SELECT (3)::smallint AS val,
812             true AS follow,
813             (users.uuid)::character varying(32) AS user_uuid,
814             (users.uuid)::character varying(32) AS target_uuid,
815             (0)::smallint AS trashed
816            FROM public.users
817         UNION
818          SELECT (LEAST((perm_1.val)::integer, edges.val))::smallint AS val,
819             edges.follow,
820             perm_1.user_uuid,
821             (edges.head_uuid)::character varying(32) AS target_uuid,
822             ((GREATEST((perm_1.trashed)::integer, edges.trashed) * edges.followtrash))::smallint AS trashed
823            FROM (perm perm_1
824              JOIN perm_edges edges ON ((perm_1.follow AND ((edges.tail_uuid)::text = (perm_1.target_uuid)::text))))
825         )
826  SELECT perm.user_uuid,
827     perm.target_uuid,
828     max(perm.val) AS perm_level,
829         CASE perm.follow
830             WHEN true THEN perm.target_uuid
831             ELSE NULL::character varying
832         END AS target_owner_uuid,
833     max(perm.trashed) AS trashed
834    FROM perm
835   GROUP BY perm.user_uuid, perm.target_uuid,
836         CASE perm.follow
837             WHEN true THEN perm.target_uuid
838             ELSE NULL::character varying
839         END
840   WITH NO DATA;
841
842
843 --
844 -- Name: nodes; Type: TABLE; Schema: public; Owner: -
845 --
846
847 CREATE TABLE public.nodes (
848     id integer NOT NULL,
849     uuid character varying(255),
850     owner_uuid character varying(255),
851     created_at timestamp without time zone NOT NULL,
852     modified_by_client_uuid character varying(255),
853     modified_by_user_uuid character varying(255),
854     modified_at timestamp without time zone,
855     slot_number integer,
856     hostname character varying(255),
857     domain character varying(255),
858     ip_address character varying(255),
859     first_ping_at timestamp without time zone,
860     last_ping_at timestamp without time zone,
861     info jsonb,
862     updated_at timestamp without time zone NOT NULL,
863     properties jsonb,
864     job_uuid character varying(255)
865 );
866
867
868 --
869 -- Name: nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
870 --
871
872 CREATE SEQUENCE public.nodes_id_seq
873     START WITH 1
874     INCREMENT BY 1
875     NO MINVALUE
876     NO MAXVALUE
877     CACHE 1;
878
879
880 --
881 -- Name: nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
882 --
883
884 ALTER SEQUENCE public.nodes_id_seq OWNED BY public.nodes.id;
885
886
887 --
888 -- Name: permission_refresh_lock; Type: TABLE; Schema: public; Owner: -
889 --
890
891 CREATE TABLE public.permission_refresh_lock (
892     id integer NOT NULL
893 );
894
895
896 --
897 -- Name: permission_refresh_lock_id_seq; Type: SEQUENCE; Schema: public; Owner: -
898 --
899
900 CREATE SEQUENCE public.permission_refresh_lock_id_seq
901     START WITH 1
902     INCREMENT BY 1
903     NO MINVALUE
904     NO MAXVALUE
905     CACHE 1;
906
907
908 --
909 -- Name: permission_refresh_lock_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
910 --
911
912 ALTER SEQUENCE public.permission_refresh_lock_id_seq OWNED BY public.permission_refresh_lock.id;
913
914
915 --
916 -- Name: pipeline_instances; Type: TABLE; Schema: public; Owner: -
917 --
918
919 CREATE TABLE public.pipeline_instances (
920     id integer NOT NULL,
921     uuid character varying(255),
922     owner_uuid character varying(255),
923     created_at timestamp without time zone NOT NULL,
924     modified_by_client_uuid character varying(255),
925     modified_by_user_uuid character varying(255),
926     modified_at timestamp without time zone,
927     pipeline_template_uuid character varying(255),
928     name character varying(255),
929     components text,
930     updated_at timestamp without time zone NOT NULL,
931     properties text,
932     state character varying(255),
933     components_summary text,
934     started_at timestamp without time zone,
935     finished_at timestamp without time zone,
936     description character varying(524288)
937 );
938
939
940 --
941 -- Name: pipeline_instances_id_seq; Type: SEQUENCE; Schema: public; Owner: -
942 --
943
944 CREATE SEQUENCE public.pipeline_instances_id_seq
945     START WITH 1
946     INCREMENT BY 1
947     NO MINVALUE
948     NO MAXVALUE
949     CACHE 1;
950
951
952 --
953 -- Name: pipeline_instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
954 --
955
956 ALTER SEQUENCE public.pipeline_instances_id_seq OWNED BY public.pipeline_instances.id;
957
958
959 --
960 -- Name: pipeline_templates; Type: TABLE; Schema: public; Owner: -
961 --
962
963 CREATE TABLE public.pipeline_templates (
964     id integer NOT NULL,
965     uuid character varying(255),
966     owner_uuid character varying(255),
967     created_at timestamp without time zone NOT NULL,
968     modified_by_client_uuid character varying(255),
969     modified_by_user_uuid character varying(255),
970     modified_at timestamp without time zone,
971     name character varying(255),
972     components text,
973     updated_at timestamp without time zone NOT NULL,
974     description character varying(524288)
975 );
976
977
978 --
979 -- Name: pipeline_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
980 --
981
982 CREATE SEQUENCE public.pipeline_templates_id_seq
983     START WITH 1
984     INCREMENT BY 1
985     NO MINVALUE
986     NO MAXVALUE
987     CACHE 1;
988
989
990 --
991 -- Name: pipeline_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
992 --
993
994 ALTER SEQUENCE public.pipeline_templates_id_seq OWNED BY public.pipeline_templates.id;
995
996
997 --
998 -- Name: repositories; Type: TABLE; Schema: public; Owner: -
999 --
1000
1001 CREATE TABLE public.repositories (
1002     id integer NOT NULL,
1003     uuid character varying(255) NOT NULL,
1004     owner_uuid character varying(255) NOT NULL,
1005     modified_by_client_uuid character varying(255),
1006     modified_by_user_uuid character varying(255),
1007     modified_at timestamp without time zone,
1008     name character varying(255),
1009     created_at timestamp without time zone NOT NULL,
1010     updated_at timestamp without time zone NOT NULL
1011 );
1012
1013
1014 --
1015 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1016 --
1017
1018 CREATE SEQUENCE public.repositories_id_seq
1019     START WITH 1
1020     INCREMENT BY 1
1021     NO MINVALUE
1022     NO MAXVALUE
1023     CACHE 1;
1024
1025
1026 --
1027 -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1028 --
1029
1030 ALTER SEQUENCE public.repositories_id_seq OWNED BY public.repositories.id;
1031
1032
1033 --
1034 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
1035 --
1036
1037 CREATE TABLE public.schema_migrations (
1038     version character varying(255) NOT NULL
1039 );
1040
1041
1042 --
1043 -- Name: specimens; Type: TABLE; Schema: public; Owner: -
1044 --
1045
1046 CREATE TABLE public.specimens (
1047     id integer NOT NULL,
1048     uuid character varying(255),
1049     owner_uuid character varying(255),
1050     created_at timestamp without time zone NOT NULL,
1051     modified_by_client_uuid character varying(255),
1052     modified_by_user_uuid character varying(255),
1053     modified_at timestamp without time zone,
1054     material character varying(255),
1055     updated_at timestamp without time zone NOT NULL,
1056     properties text
1057 );
1058
1059
1060 --
1061 -- Name: specimens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1062 --
1063
1064 CREATE SEQUENCE public.specimens_id_seq
1065     START WITH 1
1066     INCREMENT BY 1
1067     NO MINVALUE
1068     NO MAXVALUE
1069     CACHE 1;
1070
1071
1072 --
1073 -- Name: specimens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1074 --
1075
1076 ALTER SEQUENCE public.specimens_id_seq OWNED BY public.specimens.id;
1077
1078
1079 --
1080 -- Name: traits; Type: TABLE; Schema: public; Owner: -
1081 --
1082
1083 CREATE TABLE public.traits (
1084     id integer NOT NULL,
1085     uuid character varying(255) NOT NULL,
1086     owner_uuid character varying(255) NOT NULL,
1087     modified_by_client_uuid character varying(255),
1088     modified_by_user_uuid character varying(255),
1089     modified_at timestamp without time zone,
1090     name character varying(255),
1091     properties text,
1092     created_at timestamp without time zone NOT NULL,
1093     updated_at timestamp without time zone NOT NULL
1094 );
1095
1096
1097 --
1098 -- Name: traits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1099 --
1100
1101 CREATE SEQUENCE public.traits_id_seq
1102     START WITH 1
1103     INCREMENT BY 1
1104     NO MINVALUE
1105     NO MAXVALUE
1106     CACHE 1;
1107
1108
1109 --
1110 -- Name: traits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1111 --
1112
1113 ALTER SEQUENCE public.traits_id_seq OWNED BY public.traits.id;
1114
1115
1116 --
1117 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1118 --
1119
1120 CREATE SEQUENCE public.users_id_seq
1121     START WITH 1
1122     INCREMENT BY 1
1123     NO MINVALUE
1124     NO MAXVALUE
1125     CACHE 1;
1126
1127
1128 --
1129 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1130 --
1131
1132 ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
1133
1134
1135 --
1136 -- Name: virtual_machines; Type: TABLE; Schema: public; Owner: -
1137 --
1138
1139 CREATE TABLE public.virtual_machines (
1140     id integer NOT NULL,
1141     uuid character varying(255) NOT NULL,
1142     owner_uuid character varying(255) NOT NULL,
1143     modified_by_client_uuid character varying(255),
1144     modified_by_user_uuid character varying(255),
1145     modified_at timestamp without time zone,
1146     hostname character varying(255),
1147     created_at timestamp without time zone NOT NULL,
1148     updated_at timestamp without time zone NOT NULL
1149 );
1150
1151
1152 --
1153 -- Name: virtual_machines_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1154 --
1155
1156 CREATE SEQUENCE public.virtual_machines_id_seq
1157     START WITH 1
1158     INCREMENT BY 1
1159     NO MINVALUE
1160     NO MAXVALUE
1161     CACHE 1;
1162
1163
1164 --
1165 -- Name: virtual_machines_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1166 --
1167
1168 ALTER SEQUENCE public.virtual_machines_id_seq OWNED BY public.virtual_machines.id;
1169
1170
1171 --
1172 -- Name: workflows; Type: TABLE; Schema: public; Owner: -
1173 --
1174
1175 CREATE TABLE public.workflows (
1176     id integer NOT NULL,
1177     uuid character varying(255),
1178     owner_uuid character varying(255),
1179     created_at timestamp without time zone NOT NULL,
1180     modified_at timestamp without time zone,
1181     modified_by_client_uuid character varying(255),
1182     modified_by_user_uuid character varying(255),
1183     name character varying(255),
1184     description text,
1185     definition text,
1186     updated_at timestamp without time zone NOT NULL
1187 );
1188
1189
1190 --
1191 -- Name: workflows_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1192 --
1193
1194 CREATE SEQUENCE public.workflows_id_seq
1195     START WITH 1
1196     INCREMENT BY 1
1197     NO MINVALUE
1198     NO MAXVALUE
1199     CACHE 1;
1200
1201
1202 --
1203 -- Name: workflows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1204 --
1205
1206 ALTER SEQUENCE public.workflows_id_seq OWNED BY public.workflows.id;
1207
1208
1209 --
1210 -- Name: api_client_authorizations id; Type: DEFAULT; Schema: public; Owner: -
1211 --
1212
1213 ALTER TABLE ONLY public.api_client_authorizations ALTER COLUMN id SET DEFAULT nextval('public.api_client_authorizations_id_seq'::regclass);
1214
1215
1216 --
1217 -- Name: api_clients id; Type: DEFAULT; Schema: public; Owner: -
1218 --
1219
1220 ALTER TABLE ONLY public.api_clients ALTER COLUMN id SET DEFAULT nextval('public.api_clients_id_seq'::regclass);
1221
1222
1223 --
1224 -- Name: authorized_keys id; Type: DEFAULT; Schema: public; Owner: -
1225 --
1226
1227 ALTER TABLE ONLY public.authorized_keys ALTER COLUMN id SET DEFAULT nextval('public.authorized_keys_id_seq'::regclass);
1228
1229
1230 --
1231 -- Name: collections id; Type: DEFAULT; Schema: public; Owner: -
1232 --
1233
1234 ALTER TABLE ONLY public.collections ALTER COLUMN id SET DEFAULT nextval('public.collections_id_seq'::regclass);
1235
1236
1237 --
1238 -- Name: commit_ancestors id; Type: DEFAULT; Schema: public; Owner: -
1239 --
1240
1241 ALTER TABLE ONLY public.commit_ancestors ALTER COLUMN id SET DEFAULT nextval('public.commit_ancestors_id_seq'::regclass);
1242
1243
1244 --
1245 -- Name: commits id; Type: DEFAULT; Schema: public; Owner: -
1246 --
1247
1248 ALTER TABLE ONLY public.commits ALTER COLUMN id SET DEFAULT nextval('public.commits_id_seq'::regclass);
1249
1250
1251 --
1252 -- Name: container_requests id; Type: DEFAULT; Schema: public; Owner: -
1253 --
1254
1255 ALTER TABLE ONLY public.container_requests ALTER COLUMN id SET DEFAULT nextval('public.container_requests_id_seq'::regclass);
1256
1257
1258 --
1259 -- Name: containers id; Type: DEFAULT; Schema: public; Owner: -
1260 --
1261
1262 ALTER TABLE ONLY public.containers ALTER COLUMN id SET DEFAULT nextval('public.containers_id_seq'::regclass);
1263
1264
1265 --
1266 -- Name: groups id; Type: DEFAULT; Schema: public; Owner: -
1267 --
1268
1269 ALTER TABLE ONLY public.groups ALTER COLUMN id SET DEFAULT nextval('public.groups_id_seq'::regclass);
1270
1271
1272 --
1273 -- Name: humans id; Type: DEFAULT; Schema: public; Owner: -
1274 --
1275
1276 ALTER TABLE ONLY public.humans ALTER COLUMN id SET DEFAULT nextval('public.humans_id_seq'::regclass);
1277
1278
1279 --
1280 -- Name: job_tasks id; Type: DEFAULT; Schema: public; Owner: -
1281 --
1282
1283 ALTER TABLE ONLY public.job_tasks ALTER COLUMN id SET DEFAULT nextval('public.job_tasks_id_seq'::regclass);
1284
1285
1286 --
1287 -- Name: jobs id; Type: DEFAULT; Schema: public; Owner: -
1288 --
1289
1290 ALTER TABLE ONLY public.jobs ALTER COLUMN id SET DEFAULT nextval('public.jobs_id_seq'::regclass);
1291
1292
1293 --
1294 -- Name: keep_disks id; Type: DEFAULT; Schema: public; Owner: -
1295 --
1296
1297 ALTER TABLE ONLY public.keep_disks ALTER COLUMN id SET DEFAULT nextval('public.keep_disks_id_seq'::regclass);
1298
1299
1300 --
1301 -- Name: keep_services id; Type: DEFAULT; Schema: public; Owner: -
1302 --
1303
1304 ALTER TABLE ONLY public.keep_services ALTER COLUMN id SET DEFAULT nextval('public.keep_services_id_seq'::regclass);
1305
1306
1307 --
1308 -- Name: links id; Type: DEFAULT; Schema: public; Owner: -
1309 --
1310
1311 ALTER TABLE ONLY public.links ALTER COLUMN id SET DEFAULT nextval('public.links_id_seq'::regclass);
1312
1313
1314 --
1315 -- Name: logs id; Type: DEFAULT; Schema: public; Owner: -
1316 --
1317
1318 ALTER TABLE ONLY public.logs ALTER COLUMN id SET DEFAULT nextval('public.logs_id_seq'::regclass);
1319
1320
1321 --
1322 -- Name: nodes id; Type: DEFAULT; Schema: public; Owner: -
1323 --
1324
1325 ALTER TABLE ONLY public.nodes ALTER COLUMN id SET DEFAULT nextval('public.nodes_id_seq'::regclass);
1326
1327
1328 --
1329 -- Name: permission_refresh_lock id; Type: DEFAULT; Schema: public; Owner: -
1330 --
1331
1332 ALTER TABLE ONLY public.permission_refresh_lock ALTER COLUMN id SET DEFAULT nextval('public.permission_refresh_lock_id_seq'::regclass);
1333
1334
1335 --
1336 -- Name: pipeline_instances id; Type: DEFAULT; Schema: public; Owner: -
1337 --
1338
1339 ALTER TABLE ONLY public.pipeline_instances ALTER COLUMN id SET DEFAULT nextval('public.pipeline_instances_id_seq'::regclass);
1340
1341
1342 --
1343 -- Name: pipeline_templates id; Type: DEFAULT; Schema: public; Owner: -
1344 --
1345
1346 ALTER TABLE ONLY public.pipeline_templates ALTER COLUMN id SET DEFAULT nextval('public.pipeline_templates_id_seq'::regclass);
1347
1348
1349 --
1350 -- Name: repositories id; Type: DEFAULT; Schema: public; Owner: -
1351 --
1352
1353 ALTER TABLE ONLY public.repositories ALTER COLUMN id SET DEFAULT nextval('public.repositories_id_seq'::regclass);
1354
1355
1356 --
1357 -- Name: specimens id; Type: DEFAULT; Schema: public; Owner: -
1358 --
1359
1360 ALTER TABLE ONLY public.specimens ALTER COLUMN id SET DEFAULT nextval('public.specimens_id_seq'::regclass);
1361
1362
1363 --
1364 -- Name: traits id; Type: DEFAULT; Schema: public; Owner: -
1365 --
1366
1367 ALTER TABLE ONLY public.traits ALTER COLUMN id SET DEFAULT nextval('public.traits_id_seq'::regclass);
1368
1369
1370 --
1371 -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
1372 --
1373
1374 ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
1375
1376
1377 --
1378 -- Name: virtual_machines id; Type: DEFAULT; Schema: public; Owner: -
1379 --
1380
1381 ALTER TABLE ONLY public.virtual_machines ALTER COLUMN id SET DEFAULT nextval('public.virtual_machines_id_seq'::regclass);
1382
1383
1384 --
1385 -- Name: workflows id; Type: DEFAULT; Schema: public; Owner: -
1386 --
1387
1388 ALTER TABLE ONLY public.workflows ALTER COLUMN id SET DEFAULT nextval('public.workflows_id_seq'::regclass);
1389
1390
1391 --
1392 -- Name: api_client_authorizations api_client_authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1393 --
1394
1395 ALTER TABLE ONLY public.api_client_authorizations
1396     ADD CONSTRAINT api_client_authorizations_pkey PRIMARY KEY (id);
1397
1398
1399 --
1400 -- Name: api_clients api_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1401 --
1402
1403 ALTER TABLE ONLY public.api_clients
1404     ADD CONSTRAINT api_clients_pkey PRIMARY KEY (id);
1405
1406
1407 --
1408 -- Name: authorized_keys authorized_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1409 --
1410
1411 ALTER TABLE ONLY public.authorized_keys
1412     ADD CONSTRAINT authorized_keys_pkey PRIMARY KEY (id);
1413
1414
1415 --
1416 -- Name: collections collections_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1417 --
1418
1419 ALTER TABLE ONLY public.collections
1420     ADD CONSTRAINT collections_pkey PRIMARY KEY (id);
1421
1422
1423 --
1424 -- Name: commit_ancestors commit_ancestors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1425 --
1426
1427 ALTER TABLE ONLY public.commit_ancestors
1428     ADD CONSTRAINT commit_ancestors_pkey PRIMARY KEY (id);
1429
1430
1431 --
1432 -- Name: commits commits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1433 --
1434
1435 ALTER TABLE ONLY public.commits
1436     ADD CONSTRAINT commits_pkey PRIMARY KEY (id);
1437
1438
1439 --
1440 -- Name: container_requests container_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1441 --
1442
1443 ALTER TABLE ONLY public.container_requests
1444     ADD CONSTRAINT container_requests_pkey PRIMARY KEY (id);
1445
1446
1447 --
1448 -- Name: containers containers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1449 --
1450
1451 ALTER TABLE ONLY public.containers
1452     ADD CONSTRAINT containers_pkey PRIMARY KEY (id);
1453
1454
1455 --
1456 -- Name: groups groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1457 --
1458
1459 ALTER TABLE ONLY public.groups
1460     ADD CONSTRAINT groups_pkey PRIMARY KEY (id);
1461
1462
1463 --
1464 -- Name: humans humans_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1465 --
1466
1467 ALTER TABLE ONLY public.humans
1468     ADD CONSTRAINT humans_pkey PRIMARY KEY (id);
1469
1470
1471 --
1472 -- Name: job_tasks job_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1473 --
1474
1475 ALTER TABLE ONLY public.job_tasks
1476     ADD CONSTRAINT job_tasks_pkey PRIMARY KEY (id);
1477
1478
1479 --
1480 -- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1481 --
1482
1483 ALTER TABLE ONLY public.jobs
1484     ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
1485
1486
1487 --
1488 -- Name: keep_disks keep_disks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1489 --
1490
1491 ALTER TABLE ONLY public.keep_disks
1492     ADD CONSTRAINT keep_disks_pkey PRIMARY KEY (id);
1493
1494
1495 --
1496 -- Name: keep_services keep_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1497 --
1498
1499 ALTER TABLE ONLY public.keep_services
1500     ADD CONSTRAINT keep_services_pkey PRIMARY KEY (id);
1501
1502
1503 --
1504 -- Name: links links_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1505 --
1506
1507 ALTER TABLE ONLY public.links
1508     ADD CONSTRAINT links_pkey PRIMARY KEY (id);
1509
1510
1511 --
1512 -- Name: logs logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1513 --
1514
1515 ALTER TABLE ONLY public.logs
1516     ADD CONSTRAINT logs_pkey PRIMARY KEY (id);
1517
1518
1519 --
1520 -- Name: nodes nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1521 --
1522
1523 ALTER TABLE ONLY public.nodes
1524     ADD CONSTRAINT nodes_pkey PRIMARY KEY (id);
1525
1526
1527 --
1528 -- Name: permission_refresh_lock permission_refresh_lock_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1529 --
1530
1531 ALTER TABLE ONLY public.permission_refresh_lock
1532     ADD CONSTRAINT permission_refresh_lock_pkey PRIMARY KEY (id);
1533
1534
1535 --
1536 -- Name: pipeline_instances pipeline_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1537 --
1538
1539 ALTER TABLE ONLY public.pipeline_instances
1540     ADD CONSTRAINT pipeline_instances_pkey PRIMARY KEY (id);
1541
1542
1543 --
1544 -- Name: pipeline_templates pipeline_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1545 --
1546
1547 ALTER TABLE ONLY public.pipeline_templates
1548     ADD CONSTRAINT pipeline_templates_pkey PRIMARY KEY (id);
1549
1550
1551 --
1552 -- Name: repositories repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1553 --
1554
1555 ALTER TABLE ONLY public.repositories
1556     ADD CONSTRAINT repositories_pkey PRIMARY KEY (id);
1557
1558
1559 --
1560 -- Name: specimens specimens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1561 --
1562
1563 ALTER TABLE ONLY public.specimens
1564     ADD CONSTRAINT specimens_pkey PRIMARY KEY (id);
1565
1566
1567 --
1568 -- Name: traits traits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1569 --
1570
1571 ALTER TABLE ONLY public.traits
1572     ADD CONSTRAINT traits_pkey PRIMARY KEY (id);
1573
1574
1575 --
1576 -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1577 --
1578
1579 ALTER TABLE ONLY public.users
1580     ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1581
1582
1583 --
1584 -- Name: virtual_machines virtual_machines_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1585 --
1586
1587 ALTER TABLE ONLY public.virtual_machines
1588     ADD CONSTRAINT virtual_machines_pkey PRIMARY KEY (id);
1589
1590
1591 --
1592 -- Name: workflows workflows_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1593 --
1594
1595 ALTER TABLE ONLY public.workflows
1596     ADD CONSTRAINT workflows_pkey PRIMARY KEY (id);
1597
1598
1599 --
1600 -- Name: api_client_authorizations_search_index; Type: INDEX; Schema: public; Owner: -
1601 --
1602
1603 CREATE INDEX api_client_authorizations_search_index ON public.api_client_authorizations USING btree (api_token, created_by_ip_address, last_used_by_ip_address, default_owner_uuid, uuid);
1604
1605
1606 --
1607 -- Name: api_clients_search_index; Type: INDEX; Schema: public; Owner: -
1608 --
1609
1610 CREATE INDEX api_clients_search_index ON public.api_clients USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, url_prefix);
1611
1612
1613 --
1614 -- Name: authorized_keys_search_index; Type: INDEX; Schema: public; Owner: -
1615 --
1616
1617 CREATE INDEX authorized_keys_search_index ON public.authorized_keys USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, key_type, authorized_user_uuid);
1618
1619
1620 --
1621 -- Name: collection_index_on_properties; Type: INDEX; Schema: public; Owner: -
1622 --
1623
1624 CREATE INDEX collection_index_on_properties ON public.collections USING gin (properties);
1625
1626
1627 --
1628 -- Name: collections_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
1629 --
1630
1631 CREATE INDEX collections_full_text_search_idx ON public.collections USING gin (to_tsvector('english'::regconfig, (((((((((((((((((COALESCE(owner_uuid, ''::character varying))::text || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(portable_data_hash, ''::character varying))::text) || ' '::text) || (COALESCE(uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || (COALESCE(description, ''::character varying))::text) || ' '::text) || COALESCE((properties)::text, ''::text)) || ' '::text) || COALESCE(file_names, (''::character varying)::text))));
1632
1633
1634 --
1635 -- Name: collections_search_index; Type: INDEX; Schema: public; Owner: -
1636 --
1637
1638 CREATE INDEX collections_search_index ON public.collections USING btree (owner_uuid, modified_by_client_uuid, modified_by_user_uuid, portable_data_hash, uuid, name);
1639
1640
1641 --
1642 -- Name: container_requests_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
1643 --
1644
1645 CREATE INDEX container_requests_full_text_search_idx ON public.container_requests USING gin (to_tsvector('english'::regconfig, (((((((((((((((((((((((((((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(description, ''::text)) || ' '::text) || COALESCE((properties)::text, ''::text)) || ' '::text) || (COALESCE(state, ''::character varying))::text) || ' '::text) || (COALESCE(requesting_container_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(container_uuid, ''::character varying))::text) || ' '::text) || COALESCE(runtime_constraints, ''::text)) || ' '::text) || (COALESCE(container_image, ''::character varying))::text) || ' '::text) || COALESCE(environment, ''::text)) || ' '::text) || (COALESCE(cwd, ''::character varying))::text) || ' '::text) || COALESCE(command, ''::text)) || ' '::text) || (COALESCE(output_path, ''::character varying))::text) || ' '::text) || COALESCE(filters, ''::text)) || ' '::text) || COALESCE(scheduling_parameters, ''::text)) || ' '::text) || (COALESCE(output_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(log_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(output_name, ''::character varying))::text)));
1646
1647
1648 --
1649 -- Name: container_requests_index_on_properties; Type: INDEX; Schema: public; Owner: -
1650 --
1651
1652 CREATE INDEX container_requests_index_on_properties ON public.container_requests USING gin (properties);
1653
1654
1655 --
1656 -- Name: container_requests_search_index; Type: INDEX; Schema: public; Owner: -
1657 --
1658
1659 CREATE INDEX container_requests_search_index ON public.container_requests USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, state, requesting_container_uuid, container_uuid, container_image, cwd, output_path, output_uuid, log_uuid, output_name);
1660
1661
1662 --
1663 -- Name: containers_search_index; Type: INDEX; Schema: public; Owner: -
1664 --
1665
1666 CREATE INDEX containers_search_index ON public.containers USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, state, log, cwd, output_path, output, container_image, auth_uuid, locked_by_uuid);
1667
1668
1669 --
1670 -- Name: group_index_on_properties; Type: INDEX; Schema: public; Owner: -
1671 --
1672
1673 CREATE INDEX group_index_on_properties ON public.groups USING gin (properties);
1674
1675
1676 --
1677 -- Name: groups_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
1678 --
1679
1680 CREATE INDEX groups_full_text_search_idx ON public.groups USING gin (to_tsvector('english'::regconfig, (((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || (COALESCE(description, ''::character varying))::text) || ' '::text) || (COALESCE(group_class, ''::character varying))::text) || ' '::text) || COALESCE((properties)::text, ''::text))));
1681
1682
1683 --
1684 -- Name: groups_search_index; Type: INDEX; Schema: public; Owner: -
1685 --
1686
1687 CREATE INDEX groups_search_index ON public.groups USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, group_class);
1688
1689
1690 --
1691 -- Name: humans_search_index; Type: INDEX; Schema: public; Owner: -
1692 --
1693
1694 CREATE INDEX humans_search_index ON public.humans USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid);
1695
1696
1697 --
1698 -- Name: index_api_client_authorizations_on_api_client_id; Type: INDEX; Schema: public; Owner: -
1699 --
1700
1701 CREATE INDEX index_api_client_authorizations_on_api_client_id ON public.api_client_authorizations USING btree (api_client_id);
1702
1703
1704 --
1705 -- Name: index_api_client_authorizations_on_api_token; Type: INDEX; Schema: public; Owner: -
1706 --
1707
1708 CREATE UNIQUE INDEX index_api_client_authorizations_on_api_token ON public.api_client_authorizations USING btree (api_token);
1709
1710
1711 --
1712 -- Name: index_api_client_authorizations_on_expires_at; Type: INDEX; Schema: public; Owner: -
1713 --
1714
1715 CREATE INDEX index_api_client_authorizations_on_expires_at ON public.api_client_authorizations USING btree (expires_at);
1716
1717
1718 --
1719 -- Name: index_api_client_authorizations_on_user_id; Type: INDEX; Schema: public; Owner: -
1720 --
1721
1722 CREATE INDEX index_api_client_authorizations_on_user_id ON public.api_client_authorizations USING btree (user_id);
1723
1724
1725 --
1726 -- Name: index_api_client_authorizations_on_uuid; Type: INDEX; Schema: public; Owner: -
1727 --
1728
1729 CREATE UNIQUE INDEX index_api_client_authorizations_on_uuid ON public.api_client_authorizations USING btree (uuid);
1730
1731
1732 --
1733 -- Name: index_api_clients_on_created_at; Type: INDEX; Schema: public; Owner: -
1734 --
1735
1736 CREATE INDEX index_api_clients_on_created_at ON public.api_clients USING btree (created_at);
1737
1738
1739 --
1740 -- Name: index_api_clients_on_modified_at; Type: INDEX; Schema: public; Owner: -
1741 --
1742
1743 CREATE INDEX index_api_clients_on_modified_at ON public.api_clients USING btree (modified_at);
1744
1745
1746 --
1747 -- Name: index_api_clients_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1748 --
1749
1750 CREATE INDEX index_api_clients_on_owner_uuid ON public.api_clients USING btree (owner_uuid);
1751
1752
1753 --
1754 -- Name: index_api_clients_on_uuid; Type: INDEX; Schema: public; Owner: -
1755 --
1756
1757 CREATE UNIQUE INDEX index_api_clients_on_uuid ON public.api_clients USING btree (uuid);
1758
1759
1760 --
1761 -- Name: index_authkeys_on_user_and_expires_at; Type: INDEX; Schema: public; Owner: -
1762 --
1763
1764 CREATE INDEX index_authkeys_on_user_and_expires_at ON public.authorized_keys USING btree (authorized_user_uuid, expires_at);
1765
1766
1767 --
1768 -- Name: index_authorized_keys_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1769 --
1770
1771 CREATE INDEX index_authorized_keys_on_owner_uuid ON public.authorized_keys USING btree (owner_uuid);
1772
1773
1774 --
1775 -- Name: index_authorized_keys_on_uuid; Type: INDEX; Schema: public; Owner: -
1776 --
1777
1778 CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON public.authorized_keys USING btree (uuid);
1779
1780
1781 --
1782 -- Name: index_collections_on_created_at; Type: INDEX; Schema: public; Owner: -
1783 --
1784
1785 CREATE INDEX index_collections_on_created_at ON public.collections USING btree (created_at);
1786
1787
1788 --
1789 -- Name: index_collections_on_delete_at; Type: INDEX; Schema: public; Owner: -
1790 --
1791
1792 CREATE INDEX index_collections_on_delete_at ON public.collections USING btree (delete_at);
1793
1794
1795 --
1796 -- Name: index_collections_on_is_trashed; Type: INDEX; Schema: public; Owner: -
1797 --
1798
1799 CREATE INDEX index_collections_on_is_trashed ON public.collections USING btree (is_trashed);
1800
1801
1802 --
1803 -- Name: index_collections_on_modified_at; Type: INDEX; Schema: public; Owner: -
1804 --
1805
1806 CREATE INDEX index_collections_on_modified_at ON public.collections USING btree (modified_at);
1807
1808
1809 --
1810 -- Name: index_collections_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
1811 --
1812
1813 CREATE INDEX index_collections_on_modified_at_uuid ON public.collections USING btree (modified_at DESC, uuid);
1814
1815
1816 --
1817 -- Name: index_collections_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1818 --
1819
1820 CREATE INDEX index_collections_on_owner_uuid ON public.collections USING btree (owner_uuid);
1821
1822
1823 --
1824 -- Name: index_collections_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -
1825 --
1826
1827 CREATE UNIQUE INDEX index_collections_on_owner_uuid_and_name ON public.collections USING btree (owner_uuid, name) WHERE (is_trashed = false);
1828
1829
1830 --
1831 -- Name: index_collections_on_portable_data_hash_and_trash_at; Type: INDEX; Schema: public; Owner: -
1832 --
1833
1834 CREATE INDEX index_collections_on_portable_data_hash_and_trash_at ON public.collections USING btree (portable_data_hash, trash_at);
1835
1836
1837 --
1838 -- Name: index_collections_on_trash_at; Type: INDEX; Schema: public; Owner: -
1839 --
1840
1841 CREATE INDEX index_collections_on_trash_at ON public.collections USING btree (trash_at);
1842
1843
1844 --
1845 -- Name: index_collections_on_uuid; Type: INDEX; Schema: public; Owner: -
1846 --
1847
1848 CREATE UNIQUE INDEX index_collections_on_uuid ON public.collections USING btree (uuid);
1849
1850
1851 --
1852 -- Name: index_commit_ancestors_on_descendant_and_ancestor; Type: INDEX; Schema: public; Owner: -
1853 --
1854
1855 CREATE UNIQUE INDEX index_commit_ancestors_on_descendant_and_ancestor ON public.commit_ancestors USING btree (descendant, ancestor);
1856
1857
1858 --
1859 -- Name: index_commits_on_repository_name_and_sha1; Type: INDEX; Schema: public; Owner: -
1860 --
1861
1862 CREATE UNIQUE INDEX index_commits_on_repository_name_and_sha1 ON public.commits USING btree (repository_name, sha1);
1863
1864
1865 --
1866 -- Name: index_container_requests_on_container_uuid; Type: INDEX; Schema: public; Owner: -
1867 --
1868
1869 CREATE INDEX index_container_requests_on_container_uuid ON public.container_requests USING btree (container_uuid);
1870
1871
1872 --
1873 -- Name: index_container_requests_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
1874 --
1875
1876 CREATE INDEX index_container_requests_on_modified_at_uuid ON public.container_requests USING btree (modified_at DESC, uuid);
1877
1878
1879 --
1880 -- Name: index_container_requests_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1881 --
1882
1883 CREATE INDEX index_container_requests_on_owner_uuid ON public.container_requests USING btree (owner_uuid);
1884
1885
1886 --
1887 -- Name: index_container_requests_on_requesting_container_uuid; Type: INDEX; Schema: public; Owner: -
1888 --
1889
1890 CREATE INDEX index_container_requests_on_requesting_container_uuid ON public.container_requests USING btree (requesting_container_uuid);
1891
1892
1893 --
1894 -- Name: index_container_requests_on_uuid; Type: INDEX; Schema: public; Owner: -
1895 --
1896
1897 CREATE UNIQUE INDEX index_container_requests_on_uuid ON public.container_requests USING btree (uuid);
1898
1899
1900 --
1901 -- Name: index_containers_on_auth_uuid; Type: INDEX; Schema: public; Owner: -
1902 --
1903
1904 CREATE INDEX index_containers_on_auth_uuid ON public.containers USING btree (auth_uuid);
1905
1906
1907 --
1908 -- Name: index_containers_on_locked_by_uuid_and_priority; Type: INDEX; Schema: public; Owner: -
1909 --
1910
1911 CREATE INDEX index_containers_on_locked_by_uuid_and_priority ON public.containers USING btree (locked_by_uuid, priority);
1912
1913
1914 --
1915 -- Name: index_containers_on_locked_by_uuid_and_uuid; Type: INDEX; Schema: public; Owner: -
1916 --
1917
1918 CREATE INDEX index_containers_on_locked_by_uuid_and_uuid ON public.containers USING btree (locked_by_uuid, uuid);
1919
1920
1921 --
1922 -- Name: index_containers_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
1923 --
1924
1925 CREATE INDEX index_containers_on_modified_at_uuid ON public.containers USING btree (modified_at DESC, uuid);
1926
1927
1928 --
1929 -- Name: index_containers_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1930 --
1931
1932 CREATE INDEX index_containers_on_owner_uuid ON public.containers USING btree (owner_uuid);
1933
1934
1935 --
1936 -- Name: index_containers_on_queued_state; Type: INDEX; Schema: public; Owner: -
1937 --
1938
1939 CREATE INDEX index_containers_on_queued_state ON public.containers USING btree (state, ((priority > 0)));
1940
1941
1942 --
1943 -- Name: index_containers_on_reuse_columns; Type: INDEX; Schema: public; Owner: -
1944 --
1945
1946 CREATE INDEX index_containers_on_reuse_columns ON public.containers USING btree (md5(command), cwd, md5(environment), output_path, container_image, md5(mounts), secret_mounts_md5, md5(runtime_constraints));
1947
1948
1949 --
1950 -- Name: index_containers_on_runtime_status; Type: INDEX; Schema: public; Owner: -
1951 --
1952
1953 CREATE INDEX index_containers_on_runtime_status ON public.containers USING gin (runtime_status);
1954
1955
1956 --
1957 -- Name: index_containers_on_secret_mounts_md5; Type: INDEX; Schema: public; Owner: -
1958 --
1959
1960 CREATE INDEX index_containers_on_secret_mounts_md5 ON public.containers USING btree (secret_mounts_md5);
1961
1962
1963 --
1964 -- Name: index_containers_on_uuid; Type: INDEX; Schema: public; Owner: -
1965 --
1966
1967 CREATE UNIQUE INDEX index_containers_on_uuid ON public.containers USING btree (uuid);
1968
1969
1970 --
1971 -- Name: index_groups_on_created_at; Type: INDEX; Schema: public; Owner: -
1972 --
1973
1974 CREATE INDEX index_groups_on_created_at ON public.groups USING btree (created_at);
1975
1976
1977 --
1978 -- Name: index_groups_on_delete_at; Type: INDEX; Schema: public; Owner: -
1979 --
1980
1981 CREATE INDEX index_groups_on_delete_at ON public.groups USING btree (delete_at);
1982
1983
1984 --
1985 -- Name: index_groups_on_group_class; Type: INDEX; Schema: public; Owner: -
1986 --
1987
1988 CREATE INDEX index_groups_on_group_class ON public.groups USING btree (group_class);
1989
1990
1991 --
1992 -- Name: index_groups_on_is_trashed; Type: INDEX; Schema: public; Owner: -
1993 --
1994
1995 CREATE INDEX index_groups_on_is_trashed ON public.groups USING btree (is_trashed);
1996
1997
1998 --
1999 -- Name: index_groups_on_modified_at; Type: INDEX; Schema: public; Owner: -
2000 --
2001
2002 CREATE INDEX index_groups_on_modified_at ON public.groups USING btree (modified_at);
2003
2004
2005 --
2006 -- Name: index_groups_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2007 --
2008
2009 CREATE INDEX index_groups_on_modified_at_uuid ON public.groups USING btree (modified_at DESC, uuid);
2010
2011
2012 --
2013 -- Name: index_groups_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2014 --
2015
2016 CREATE INDEX index_groups_on_owner_uuid ON public.groups USING btree (owner_uuid);
2017
2018
2019 --
2020 -- Name: index_groups_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -
2021 --
2022
2023 CREATE UNIQUE INDEX index_groups_on_owner_uuid_and_name ON public.groups USING btree (owner_uuid, name) WHERE (is_trashed = false);
2024
2025
2026 --
2027 -- Name: index_groups_on_trash_at; Type: INDEX; Schema: public; Owner: -
2028 --
2029
2030 CREATE INDEX index_groups_on_trash_at ON public.groups USING btree (trash_at);
2031
2032
2033 --
2034 -- Name: index_groups_on_uuid; Type: INDEX; Schema: public; Owner: -
2035 --
2036
2037 CREATE UNIQUE INDEX index_groups_on_uuid ON public.groups USING btree (uuid);
2038
2039
2040 --
2041 -- Name: index_humans_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2042 --
2043
2044 CREATE INDEX index_humans_on_owner_uuid ON public.humans USING btree (owner_uuid);
2045
2046
2047 --
2048 -- Name: index_humans_on_uuid; Type: INDEX; Schema: public; Owner: -
2049 --
2050
2051 CREATE UNIQUE INDEX index_humans_on_uuid ON public.humans USING btree (uuid);
2052
2053
2054 --
2055 -- Name: index_job_tasks_on_created_at; Type: INDEX; Schema: public; Owner: -
2056 --
2057
2058 CREATE INDEX index_job_tasks_on_created_at ON public.job_tasks USING btree (created_at);
2059
2060
2061 --
2062 -- Name: index_job_tasks_on_created_by_job_task_uuid; Type: INDEX; Schema: public; Owner: -
2063 --
2064
2065 CREATE INDEX index_job_tasks_on_created_by_job_task_uuid ON public.job_tasks USING btree (created_by_job_task_uuid);
2066
2067
2068 --
2069 -- Name: index_job_tasks_on_job_uuid; Type: INDEX; Schema: public; Owner: -
2070 --
2071
2072 CREATE INDEX index_job_tasks_on_job_uuid ON public.job_tasks USING btree (job_uuid);
2073
2074
2075 --
2076 -- Name: index_job_tasks_on_modified_at; Type: INDEX; Schema: public; Owner: -
2077 --
2078
2079 CREATE INDEX index_job_tasks_on_modified_at ON public.job_tasks USING btree (modified_at);
2080
2081
2082 --
2083 -- Name: index_job_tasks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2084 --
2085
2086 CREATE INDEX index_job_tasks_on_owner_uuid ON public.job_tasks USING btree (owner_uuid);
2087
2088
2089 --
2090 -- Name: index_job_tasks_on_sequence; Type: INDEX; Schema: public; Owner: -
2091 --
2092
2093 CREATE INDEX index_job_tasks_on_sequence ON public.job_tasks USING btree (sequence);
2094
2095
2096 --
2097 -- Name: index_job_tasks_on_success; Type: INDEX; Schema: public; Owner: -
2098 --
2099
2100 CREATE INDEX index_job_tasks_on_success ON public.job_tasks USING btree (success);
2101
2102
2103 --
2104 -- Name: index_job_tasks_on_uuid; Type: INDEX; Schema: public; Owner: -
2105 --
2106
2107 CREATE UNIQUE INDEX index_job_tasks_on_uuid ON public.job_tasks USING btree (uuid);
2108
2109
2110 --
2111 -- Name: index_jobs_on_created_at; Type: INDEX; Schema: public; Owner: -
2112 --
2113
2114 CREATE INDEX index_jobs_on_created_at ON public.jobs USING btree (created_at);
2115
2116
2117 --
2118 -- Name: index_jobs_on_finished_at; Type: INDEX; Schema: public; Owner: -
2119 --
2120
2121 CREATE INDEX index_jobs_on_finished_at ON public.jobs USING btree (finished_at);
2122
2123
2124 --
2125 -- Name: index_jobs_on_modified_at; Type: INDEX; Schema: public; Owner: -
2126 --
2127
2128 CREATE INDEX index_jobs_on_modified_at ON public.jobs USING btree (modified_at);
2129
2130
2131 --
2132 -- Name: index_jobs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2133 --
2134
2135 CREATE INDEX index_jobs_on_modified_at_uuid ON public.jobs USING btree (modified_at DESC, uuid);
2136
2137
2138 --
2139 -- Name: index_jobs_on_output; Type: INDEX; Schema: public; Owner: -
2140 --
2141
2142 CREATE INDEX index_jobs_on_output ON public.jobs USING btree (output);
2143
2144
2145 --
2146 -- Name: index_jobs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2147 --
2148
2149 CREATE INDEX index_jobs_on_owner_uuid ON public.jobs USING btree (owner_uuid);
2150
2151
2152 --
2153 -- Name: index_jobs_on_script; Type: INDEX; Schema: public; Owner: -
2154 --
2155
2156 CREATE INDEX index_jobs_on_script ON public.jobs USING btree (script);
2157
2158
2159 --
2160 -- Name: index_jobs_on_script_parameters_digest; Type: INDEX; Schema: public; Owner: -
2161 --
2162
2163 CREATE INDEX index_jobs_on_script_parameters_digest ON public.jobs USING btree (script_parameters_digest);
2164
2165
2166 --
2167 -- Name: index_jobs_on_started_at; Type: INDEX; Schema: public; Owner: -
2168 --
2169
2170 CREATE INDEX index_jobs_on_started_at ON public.jobs USING btree (started_at);
2171
2172
2173 --
2174 -- Name: index_jobs_on_submit_id; Type: INDEX; Schema: public; Owner: -
2175 --
2176
2177 CREATE UNIQUE INDEX index_jobs_on_submit_id ON public.jobs USING btree (submit_id);
2178
2179
2180 --
2181 -- Name: index_jobs_on_uuid; Type: INDEX; Schema: public; Owner: -
2182 --
2183
2184 CREATE UNIQUE INDEX index_jobs_on_uuid ON public.jobs USING btree (uuid);
2185
2186
2187 --
2188 -- Name: index_keep_disks_on_filesystem_uuid; Type: INDEX; Schema: public; Owner: -
2189 --
2190
2191 CREATE INDEX index_keep_disks_on_filesystem_uuid ON public.keep_disks USING btree (filesystem_uuid);
2192
2193
2194 --
2195 -- Name: index_keep_disks_on_last_ping_at; Type: INDEX; Schema: public; Owner: -
2196 --
2197
2198 CREATE INDEX index_keep_disks_on_last_ping_at ON public.keep_disks USING btree (last_ping_at);
2199
2200
2201 --
2202 -- Name: index_keep_disks_on_node_uuid; Type: INDEX; Schema: public; Owner: -
2203 --
2204
2205 CREATE INDEX index_keep_disks_on_node_uuid ON public.keep_disks USING btree (node_uuid);
2206
2207
2208 --
2209 -- Name: index_keep_disks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2210 --
2211
2212 CREATE INDEX index_keep_disks_on_owner_uuid ON public.keep_disks USING btree (owner_uuid);
2213
2214
2215 --
2216 -- Name: index_keep_disks_on_uuid; Type: INDEX; Schema: public; Owner: -
2217 --
2218
2219 CREATE UNIQUE INDEX index_keep_disks_on_uuid ON public.keep_disks USING btree (uuid);
2220
2221
2222 --
2223 -- Name: index_keep_services_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2224 --
2225
2226 CREATE INDEX index_keep_services_on_owner_uuid ON public.keep_services USING btree (owner_uuid);
2227
2228
2229 --
2230 -- Name: index_keep_services_on_uuid; Type: INDEX; Schema: public; Owner: -
2231 --
2232
2233 CREATE UNIQUE INDEX index_keep_services_on_uuid ON public.keep_services USING btree (uuid);
2234
2235
2236 --
2237 -- Name: index_links_on_created_at; Type: INDEX; Schema: public; Owner: -
2238 --
2239
2240 CREATE INDEX index_links_on_created_at ON public.links USING btree (created_at);
2241
2242
2243 --
2244 -- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -
2245 --
2246
2247 CREATE INDEX index_links_on_head_uuid ON public.links USING btree (head_uuid);
2248
2249
2250 --
2251 -- Name: index_links_on_modified_at; Type: INDEX; Schema: public; Owner: -
2252 --
2253
2254 CREATE INDEX index_links_on_modified_at ON public.links USING btree (modified_at);
2255
2256
2257 --
2258 -- Name: index_links_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2259 --
2260
2261 CREATE INDEX index_links_on_modified_at_uuid ON public.links USING btree (modified_at DESC, uuid);
2262
2263
2264 --
2265 -- Name: index_links_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2266 --
2267
2268 CREATE INDEX index_links_on_owner_uuid ON public.links USING btree (owner_uuid);
2269
2270
2271 --
2272 -- Name: index_links_on_tail_uuid; Type: INDEX; Schema: public; Owner: -
2273 --
2274
2275 CREATE INDEX index_links_on_tail_uuid ON public.links USING btree (tail_uuid);
2276
2277
2278 --
2279 -- Name: index_links_on_uuid; Type: INDEX; Schema: public; Owner: -
2280 --
2281
2282 CREATE UNIQUE INDEX index_links_on_uuid ON public.links USING btree (uuid);
2283
2284
2285 --
2286 -- Name: index_logs_on_created_at; Type: INDEX; Schema: public; Owner: -
2287 --
2288
2289 CREATE INDEX index_logs_on_created_at ON public.logs USING btree (created_at);
2290
2291
2292 --
2293 -- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -
2294 --
2295
2296 CREATE INDEX index_logs_on_event_at ON public.logs USING btree (event_at);
2297
2298
2299 --
2300 -- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -
2301 --
2302
2303 CREATE INDEX index_logs_on_event_type ON public.logs USING btree (event_type);
2304
2305
2306 --
2307 -- Name: index_logs_on_modified_at; Type: INDEX; Schema: public; Owner: -
2308 --
2309
2310 CREATE INDEX index_logs_on_modified_at ON public.logs USING btree (modified_at);
2311
2312
2313 --
2314 -- Name: index_logs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2315 --
2316
2317 CREATE INDEX index_logs_on_modified_at_uuid ON public.logs USING btree (modified_at DESC, uuid);
2318
2319
2320 --
2321 -- Name: index_logs_on_object_owner_uuid; Type: INDEX; Schema: public; Owner: -
2322 --
2323
2324 CREATE INDEX index_logs_on_object_owner_uuid ON public.logs USING btree (object_owner_uuid);
2325
2326
2327 --
2328 -- Name: index_logs_on_object_uuid; Type: INDEX; Schema: public; Owner: -
2329 --
2330
2331 CREATE INDEX index_logs_on_object_uuid ON public.logs USING btree (object_uuid);
2332
2333
2334 --
2335 -- Name: index_logs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2336 --
2337
2338 CREATE INDEX index_logs_on_owner_uuid ON public.logs USING btree (owner_uuid);
2339
2340
2341 --
2342 -- Name: index_logs_on_summary; Type: INDEX; Schema: public; Owner: -
2343 --
2344
2345 CREATE INDEX index_logs_on_summary ON public.logs USING btree (summary);
2346
2347
2348 --
2349 -- Name: index_logs_on_uuid; Type: INDEX; Schema: public; Owner: -
2350 --
2351
2352 CREATE UNIQUE INDEX index_logs_on_uuid ON public.logs USING btree (uuid);
2353
2354
2355 --
2356 -- Name: index_nodes_on_created_at; Type: INDEX; Schema: public; Owner: -
2357 --
2358
2359 CREATE INDEX index_nodes_on_created_at ON public.nodes USING btree (created_at);
2360
2361
2362 --
2363 -- Name: index_nodes_on_hostname; Type: INDEX; Schema: public; Owner: -
2364 --
2365
2366 CREATE INDEX index_nodes_on_hostname ON public.nodes USING btree (hostname);
2367
2368
2369 --
2370 -- Name: index_nodes_on_modified_at; Type: INDEX; Schema: public; Owner: -
2371 --
2372
2373 CREATE INDEX index_nodes_on_modified_at ON public.nodes USING btree (modified_at);
2374
2375
2376 --
2377 -- Name: index_nodes_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2378 --
2379
2380 CREATE INDEX index_nodes_on_owner_uuid ON public.nodes USING btree (owner_uuid);
2381
2382
2383 --
2384 -- Name: index_nodes_on_slot_number; Type: INDEX; Schema: public; Owner: -
2385 --
2386
2387 CREATE UNIQUE INDEX index_nodes_on_slot_number ON public.nodes USING btree (slot_number);
2388
2389
2390 --
2391 -- Name: index_nodes_on_uuid; Type: INDEX; Schema: public; Owner: -
2392 --
2393
2394 CREATE UNIQUE INDEX index_nodes_on_uuid ON public.nodes USING btree (uuid);
2395
2396
2397 --
2398 -- Name: index_pipeline_instances_on_created_at; Type: INDEX; Schema: public; Owner: -
2399 --
2400
2401 CREATE INDEX index_pipeline_instances_on_created_at ON public.pipeline_instances USING btree (created_at);
2402
2403
2404 --
2405 -- Name: index_pipeline_instances_on_modified_at; Type: INDEX; Schema: public; Owner: -
2406 --
2407
2408 CREATE INDEX index_pipeline_instances_on_modified_at ON public.pipeline_instances USING btree (modified_at);
2409
2410
2411 --
2412 -- Name: index_pipeline_instances_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2413 --
2414
2415 CREATE INDEX index_pipeline_instances_on_modified_at_uuid ON public.pipeline_instances USING btree (modified_at DESC, uuid);
2416
2417
2418 --
2419 -- Name: index_pipeline_instances_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2420 --
2421
2422 CREATE INDEX index_pipeline_instances_on_owner_uuid ON public.pipeline_instances USING btree (owner_uuid);
2423
2424
2425 --
2426 -- Name: index_pipeline_instances_on_uuid; Type: INDEX; Schema: public; Owner: -
2427 --
2428
2429 CREATE UNIQUE INDEX index_pipeline_instances_on_uuid ON public.pipeline_instances USING btree (uuid);
2430
2431
2432 --
2433 -- Name: index_pipeline_templates_on_created_at; Type: INDEX; Schema: public; Owner: -
2434 --
2435
2436 CREATE INDEX index_pipeline_templates_on_created_at ON public.pipeline_templates USING btree (created_at);
2437
2438
2439 --
2440 -- Name: index_pipeline_templates_on_modified_at; Type: INDEX; Schema: public; Owner: -
2441 --
2442
2443 CREATE INDEX index_pipeline_templates_on_modified_at ON public.pipeline_templates USING btree (modified_at);
2444
2445
2446 --
2447 -- Name: index_pipeline_templates_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2448 --
2449
2450 CREATE INDEX index_pipeline_templates_on_modified_at_uuid ON public.pipeline_templates USING btree (modified_at DESC, uuid);
2451
2452
2453 --
2454 -- Name: index_pipeline_templates_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2455 --
2456
2457 CREATE INDEX index_pipeline_templates_on_owner_uuid ON public.pipeline_templates USING btree (owner_uuid);
2458
2459
2460 --
2461 -- Name: index_pipeline_templates_on_uuid; Type: INDEX; Schema: public; Owner: -
2462 --
2463
2464 CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON public.pipeline_templates USING btree (uuid);
2465
2466
2467 --
2468 -- Name: index_repositories_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2469 --
2470
2471 CREATE INDEX index_repositories_on_modified_at_uuid ON public.repositories USING btree (modified_at DESC, uuid);
2472
2473
2474 --
2475 -- Name: index_repositories_on_name; Type: INDEX; Schema: public; Owner: -
2476 --
2477
2478 CREATE UNIQUE INDEX index_repositories_on_name ON public.repositories USING btree (name);
2479
2480
2481 --
2482 -- Name: index_repositories_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2483 --
2484
2485 CREATE INDEX index_repositories_on_owner_uuid ON public.repositories USING btree (owner_uuid);
2486
2487
2488 --
2489 -- Name: index_repositories_on_uuid; Type: INDEX; Schema: public; Owner: -
2490 --
2491
2492 CREATE UNIQUE INDEX index_repositories_on_uuid ON public.repositories USING btree (uuid);
2493
2494
2495 --
2496 -- Name: index_specimens_on_created_at; Type: INDEX; Schema: public; Owner: -
2497 --
2498
2499 CREATE INDEX index_specimens_on_created_at ON public.specimens USING btree (created_at);
2500
2501
2502 --
2503 -- Name: index_specimens_on_modified_at; Type: INDEX; Schema: public; Owner: -
2504 --
2505
2506 CREATE INDEX index_specimens_on_modified_at ON public.specimens USING btree (modified_at);
2507
2508
2509 --
2510 -- Name: index_specimens_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2511 --
2512
2513 CREATE INDEX index_specimens_on_owner_uuid ON public.specimens USING btree (owner_uuid);
2514
2515
2516 --
2517 -- Name: index_specimens_on_uuid; Type: INDEX; Schema: public; Owner: -
2518 --
2519
2520 CREATE UNIQUE INDEX index_specimens_on_uuid ON public.specimens USING btree (uuid);
2521
2522
2523 --
2524 -- Name: index_traits_on_name; Type: INDEX; Schema: public; Owner: -
2525 --
2526
2527 CREATE INDEX index_traits_on_name ON public.traits USING btree (name);
2528
2529
2530 --
2531 -- Name: index_traits_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2532 --
2533
2534 CREATE INDEX index_traits_on_owner_uuid ON public.traits USING btree (owner_uuid);
2535
2536
2537 --
2538 -- Name: index_traits_on_uuid; Type: INDEX; Schema: public; Owner: -
2539 --
2540
2541 CREATE UNIQUE INDEX index_traits_on_uuid ON public.traits USING btree (uuid);
2542
2543
2544 --
2545 -- Name: index_users_on_created_at; Type: INDEX; Schema: public; Owner: -
2546 --
2547
2548 CREATE INDEX index_users_on_created_at ON public.users USING btree (created_at);
2549
2550
2551 --
2552 -- Name: index_users_on_modified_at; Type: INDEX; Schema: public; Owner: -
2553 --
2554
2555 CREATE INDEX index_users_on_modified_at ON public.users USING btree (modified_at);
2556
2557
2558 --
2559 -- Name: index_users_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2560 --
2561
2562 CREATE INDEX index_users_on_modified_at_uuid ON public.users USING btree (modified_at DESC, uuid);
2563
2564
2565 --
2566 -- Name: index_users_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2567 --
2568
2569 CREATE INDEX index_users_on_owner_uuid ON public.users USING btree (owner_uuid);
2570
2571
2572 --
2573 -- Name: index_users_on_username; Type: INDEX; Schema: public; Owner: -
2574 --
2575
2576 CREATE UNIQUE INDEX index_users_on_username ON public.users USING btree (username);
2577
2578
2579 --
2580 -- Name: index_users_on_uuid; Type: INDEX; Schema: public; Owner: -
2581 --
2582
2583 CREATE UNIQUE INDEX index_users_on_uuid ON public.users USING btree (uuid);
2584
2585
2586 --
2587 -- Name: index_virtual_machines_on_hostname; Type: INDEX; Schema: public; Owner: -
2588 --
2589
2590 CREATE INDEX index_virtual_machines_on_hostname ON public.virtual_machines USING btree (hostname);
2591
2592
2593 --
2594 -- Name: index_virtual_machines_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2595 --
2596
2597 CREATE INDEX index_virtual_machines_on_modified_at_uuid ON public.virtual_machines USING btree (modified_at DESC, uuid);
2598
2599
2600 --
2601 -- Name: index_virtual_machines_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2602 --
2603
2604 CREATE INDEX index_virtual_machines_on_owner_uuid ON public.virtual_machines USING btree (owner_uuid);
2605
2606
2607 --
2608 -- Name: index_virtual_machines_on_uuid; Type: INDEX; Schema: public; Owner: -
2609 --
2610
2611 CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON public.virtual_machines USING btree (uuid);
2612
2613
2614 --
2615 -- Name: index_workflows_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2616 --
2617
2618 CREATE INDEX index_workflows_on_modified_at_uuid ON public.workflows USING btree (modified_at DESC, uuid);
2619
2620
2621 --
2622 -- Name: index_workflows_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2623 --
2624
2625 CREATE INDEX index_workflows_on_owner_uuid ON public.workflows USING btree (owner_uuid);
2626
2627
2628 --
2629 -- Name: index_workflows_on_uuid; Type: INDEX; Schema: public; Owner: -
2630 --
2631
2632 CREATE UNIQUE INDEX index_workflows_on_uuid ON public.workflows USING btree (uuid);
2633
2634
2635 --
2636 -- Name: job_tasks_search_index; Type: INDEX; Schema: public; Owner: -
2637 --
2638
2639 CREATE INDEX job_tasks_search_index ON public.job_tasks USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, job_uuid, created_by_job_task_uuid);
2640
2641
2642 --
2643 -- Name: jobs_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
2644 --
2645
2646 CREATE INDEX jobs_full_text_search_idx ON public.jobs USING gin (to_tsvector('english'::regconfig, (((((((((((((((((((((((((((((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(submit_id, ''::character varying))::text) || ' '::text) || (COALESCE(script, ''::character varying))::text) || ' '::text) || (COALESCE(script_version, ''::character varying))::text) || ' '::text) || COALESCE(script_parameters, ''::text)) || ' '::text) || (COALESCE(cancelled_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(cancelled_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(output, ''::character varying))::text) || ' '::text) || (COALESCE(is_locked_by_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(log, ''::character varying))::text) || ' '::text) || COALESCE(tasks_summary, ''::text)) || ' '::text) || COALESCE(runtime_constraints, ''::text)) || ' '::text) || (COALESCE(repository, ''::character varying))::text) || ' '::text) || (COALESCE(supplied_script_version, ''::character varying))::text) || ' '::text) || (COALESCE(docker_image_locator, ''::character varying))::text) || ' '::text) || (COALESCE(description, ''::character varying))::text) || ' '::text) || (COALESCE(state, ''::character varying))::text) || ' '::text) || (COALESCE(arvados_sdk_version, ''::character varying))::text) || ' '::text) || COALESCE(components, ''::text))));
2647
2648
2649 --
2650 -- Name: jobs_search_index; Type: INDEX; Schema: public; Owner: -
2651 --
2652
2653 CREATE INDEX jobs_search_index ON public.jobs USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, submit_id, script, script_version, cancelled_by_client_uuid, cancelled_by_user_uuid, output, is_locked_by_uuid, log, repository, supplied_script_version, docker_image_locator, state, arvados_sdk_version);
2654
2655
2656 --
2657 -- Name: keep_disks_search_index; Type: INDEX; Schema: public; Owner: -
2658 --
2659
2660 CREATE INDEX keep_disks_search_index ON public.keep_disks USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, ping_secret, node_uuid, filesystem_uuid, keep_service_uuid);
2661
2662
2663 --
2664 -- Name: keep_services_search_index; Type: INDEX; Schema: public; Owner: -
2665 --
2666
2667 CREATE INDEX keep_services_search_index ON public.keep_services USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, service_host, service_type);
2668
2669
2670 --
2671 -- Name: links_index_on_properties; Type: INDEX; Schema: public; Owner: -
2672 --
2673
2674 CREATE INDEX links_index_on_properties ON public.links USING gin (properties);
2675
2676
2677 --
2678 -- Name: links_search_index; Type: INDEX; Schema: public; Owner: -
2679 --
2680
2681 CREATE INDEX links_search_index ON public.links USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, tail_uuid, link_class, name, head_uuid);
2682
2683
2684 --
2685 -- Name: links_tail_name_unique_if_link_class_name; Type: INDEX; Schema: public; Owner: -
2686 --
2687
2688 CREATE UNIQUE INDEX links_tail_name_unique_if_link_class_name ON public.links USING btree (tail_uuid, name) WHERE ((link_class)::text = 'name'::text);
2689
2690
2691 --
2692 -- Name: logs_search_index; Type: INDEX; Schema: public; Owner: -
2693 --
2694
2695 CREATE INDEX logs_search_index ON public.logs USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, object_uuid, event_type, object_owner_uuid);
2696
2697
2698 --
2699 -- Name: nodes_index_on_info; Type: INDEX; Schema: public; Owner: -
2700 --
2701
2702 CREATE INDEX nodes_index_on_info ON public.nodes USING gin (info);
2703
2704
2705 --
2706 -- Name: nodes_index_on_properties; Type: INDEX; Schema: public; Owner: -
2707 --
2708
2709 CREATE INDEX nodes_index_on_properties ON public.nodes USING gin (properties);
2710
2711
2712 --
2713 -- Name: nodes_search_index; Type: INDEX; Schema: public; Owner: -
2714 --
2715
2716 CREATE INDEX nodes_search_index ON public.nodes USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname, domain, ip_address, job_uuid);
2717
2718
2719 --
2720 -- Name: permission_target_trashed; Type: INDEX; Schema: public; Owner: -
2721 --
2722
2723 CREATE INDEX permission_target_trashed ON public.materialized_permission_view USING btree (trashed, target_uuid);
2724
2725
2726 --
2727 -- Name: permission_target_user_trashed_level; Type: INDEX; Schema: public; Owner: -
2728 --
2729
2730 CREATE INDEX permission_target_user_trashed_level ON public.materialized_permission_view USING btree (user_uuid, trashed, perm_level);
2731
2732
2733 --
2734 -- Name: pipeline_instances_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
2735 --
2736
2737 CREATE INDEX pipeline_instances_full_text_search_idx ON public.pipeline_instances USING gin (to_tsvector('english'::regconfig, (((((((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(pipeline_template_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(components, ''::text)) || ' '::text) || COALESCE(properties, ''::text)) || ' '::text) || (COALESCE(state, ''::character varying))::text) || ' '::text) || COALESCE(components_summary, ''::text)) || ' '::text) || (COALESCE(description, ''::character varying))::text)));
2738
2739
2740 --
2741 -- Name: pipeline_instances_search_index; Type: INDEX; Schema: public; Owner: -
2742 --
2743
2744 CREATE INDEX pipeline_instances_search_index ON public.pipeline_instances USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, pipeline_template_uuid, name, state);
2745
2746
2747 --
2748 -- Name: pipeline_template_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -
2749 --
2750
2751 CREATE UNIQUE INDEX pipeline_template_owner_uuid_name_unique ON public.pipeline_templates USING btree (owner_uuid, name);
2752
2753
2754 --
2755 -- Name: pipeline_templates_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
2756 --
2757
2758 CREATE INDEX pipeline_templates_full_text_search_idx ON public.pipeline_templates USING gin (to_tsvector('english'::regconfig, (((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(components, ''::text)) || ' '::text) || (COALESCE(description, ''::character varying))::text)));
2759
2760
2761 --
2762 -- Name: pipeline_templates_search_index; Type: INDEX; Schema: public; Owner: -
2763 --
2764
2765 CREATE INDEX pipeline_templates_search_index ON public.pipeline_templates USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2766
2767
2768 --
2769 -- Name: repositories_search_index; Type: INDEX; Schema: public; Owner: -
2770 --
2771
2772 CREATE INDEX repositories_search_index ON public.repositories USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2773
2774
2775 --
2776 -- Name: specimens_search_index; Type: INDEX; Schema: public; Owner: -
2777 --
2778
2779 CREATE INDEX specimens_search_index ON public.specimens USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, material);
2780
2781
2782 --
2783 -- Name: traits_search_index; Type: INDEX; Schema: public; Owner: -
2784 --
2785
2786 CREATE INDEX traits_search_index ON public.traits USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2787
2788
2789 --
2790 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
2791 --
2792
2793 CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version);
2794
2795
2796 --
2797 -- Name: users_search_index; Type: INDEX; Schema: public; Owner: -
2798 --
2799
2800 CREATE INDEX users_search_index ON public.users USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, email, first_name, last_name, identity_url, default_owner_uuid, username, redirect_to_user_uuid);
2801
2802
2803 --
2804 -- Name: virtual_machines_search_index; Type: INDEX; Schema: public; Owner: -
2805 --
2806
2807 CREATE INDEX virtual_machines_search_index ON public.virtual_machines USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname);
2808
2809
2810 --
2811 -- Name: workflows_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
2812 --
2813
2814 CREATE INDEX workflows_full_text_search_idx ON public.workflows USING gin (to_tsvector('english'::regconfig, (((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(description, ''::text))));
2815
2816
2817 --
2818 -- Name: workflows_search_idx; Type: INDEX; Schema: public; Owner: -
2819 --
2820
2821 CREATE INDEX workflows_search_idx ON public.workflows USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2822
2823
2824 --
2825 -- PostgreSQL database dump complete
2826 --
2827
2828 SET search_path TO "$user", public;
2829
2830 INSERT INTO schema_migrations (version) VALUES ('20121016005009');
2831
2832 INSERT INTO schema_migrations (version) VALUES ('20130105203021');
2833
2834 INSERT INTO schema_migrations (version) VALUES ('20130105224358');
2835
2836 INSERT INTO schema_migrations (version) VALUES ('20130105224618');
2837
2838 INSERT INTO schema_migrations (version) VALUES ('20130107181109');
2839
2840 INSERT INTO schema_migrations (version) VALUES ('20130107212832');
2841
2842 INSERT INTO schema_migrations (version) VALUES ('20130109175700');
2843
2844 INSERT INTO schema_migrations (version) VALUES ('20130109220548');
2845
2846 INSERT INTO schema_migrations (version) VALUES ('20130113214204');
2847
2848 INSERT INTO schema_migrations (version) VALUES ('20130116024233');
2849
2850 INSERT INTO schema_migrations (version) VALUES ('20130116215213');
2851
2852 INSERT INTO schema_migrations (version) VALUES ('20130118002239');
2853
2854 INSERT INTO schema_migrations (version) VALUES ('20130122020042');
2855
2856 INSERT INTO schema_migrations (version) VALUES ('20130122201442');
2857
2858 INSERT INTO schema_migrations (version) VALUES ('20130122221616');
2859
2860 INSERT INTO schema_migrations (version) VALUES ('20130123174514');
2861
2862 INSERT INTO schema_migrations (version) VALUES ('20130123180224');
2863
2864 INSERT INTO schema_migrations (version) VALUES ('20130123180228');
2865
2866 INSERT INTO schema_migrations (version) VALUES ('20130125220425');
2867
2868 INSERT INTO schema_migrations (version) VALUES ('20130128202518');
2869
2870 INSERT INTO schema_migrations (version) VALUES ('20130128231343');
2871
2872 INSERT INTO schema_migrations (version) VALUES ('20130130205749');
2873
2874 INSERT INTO schema_migrations (version) VALUES ('20130203104818');
2875
2876 INSERT INTO schema_migrations (version) VALUES ('20130203104824');
2877
2878 INSERT INTO schema_migrations (version) VALUES ('20130203115329');
2879
2880 INSERT INTO schema_migrations (version) VALUES ('20130207195855');
2881
2882 INSERT INTO schema_migrations (version) VALUES ('20130218181504');
2883
2884 INSERT INTO schema_migrations (version) VALUES ('20130226170000');
2885
2886 INSERT INTO schema_migrations (version) VALUES ('20130313175417');
2887
2888 INSERT INTO schema_migrations (version) VALUES ('20130315155820');
2889
2890 INSERT INTO schema_migrations (version) VALUES ('20130315183626');
2891
2892 INSERT INTO schema_migrations (version) VALUES ('20130315213205');
2893
2894 INSERT INTO schema_migrations (version) VALUES ('20130318002138');
2895
2896 INSERT INTO schema_migrations (version) VALUES ('20130319165853');
2897
2898 INSERT INTO schema_migrations (version) VALUES ('20130319180730');
2899
2900 INSERT INTO schema_migrations (version) VALUES ('20130319194637');
2901
2902 INSERT INTO schema_migrations (version) VALUES ('20130319201431');
2903
2904 INSERT INTO schema_migrations (version) VALUES ('20130319235957');
2905
2906 INSERT INTO schema_migrations (version) VALUES ('20130320000107');
2907
2908 INSERT INTO schema_migrations (version) VALUES ('20130326173804');
2909
2910 INSERT INTO schema_migrations (version) VALUES ('20130326182917');
2911
2912 INSERT INTO schema_migrations (version) VALUES ('20130415020241');
2913
2914 INSERT INTO schema_migrations (version) VALUES ('20130425024459');
2915
2916 INSERT INTO schema_migrations (version) VALUES ('20130425214427');
2917
2918 INSERT INTO schema_migrations (version) VALUES ('20130523060112');
2919
2920 INSERT INTO schema_migrations (version) VALUES ('20130523060213');
2921
2922 INSERT INTO schema_migrations (version) VALUES ('20130524042319');
2923
2924 INSERT INTO schema_migrations (version) VALUES ('20130528134100');
2925
2926 INSERT INTO schema_migrations (version) VALUES ('20130606183519');
2927
2928 INSERT INTO schema_migrations (version) VALUES ('20130608053730');
2929
2930 INSERT INTO schema_migrations (version) VALUES ('20130610202538');
2931
2932 INSERT INTO schema_migrations (version) VALUES ('20130611163736');
2933
2934 INSERT INTO schema_migrations (version) VALUES ('20130612042554');
2935
2936 INSERT INTO schema_migrations (version) VALUES ('20130617150007');
2937
2938 INSERT INTO schema_migrations (version) VALUES ('20130626002829');
2939
2940 INSERT INTO schema_migrations (version) VALUES ('20130626022810');
2941
2942 INSERT INTO schema_migrations (version) VALUES ('20130627154537');
2943
2944 INSERT INTO schema_migrations (version) VALUES ('20130627184333');
2945
2946 INSERT INTO schema_migrations (version) VALUES ('20130708163414');
2947
2948 INSERT INTO schema_migrations (version) VALUES ('20130708182912');
2949
2950 INSERT INTO schema_migrations (version) VALUES ('20130708185153');
2951
2952 INSERT INTO schema_migrations (version) VALUES ('20130724153034');
2953
2954 INSERT INTO schema_migrations (version) VALUES ('20131007180607');
2955
2956 INSERT INTO schema_migrations (version) VALUES ('20140117231056');
2957
2958 INSERT INTO schema_migrations (version) VALUES ('20140124222114');
2959
2960 INSERT INTO schema_migrations (version) VALUES ('20140129184311');
2961
2962 INSERT INTO schema_migrations (version) VALUES ('20140317135600');
2963
2964 INSERT INTO schema_migrations (version) VALUES ('20140319160547');
2965
2966 INSERT INTO schema_migrations (version) VALUES ('20140321191343');
2967
2968 INSERT INTO schema_migrations (version) VALUES ('20140324024606');
2969
2970 INSERT INTO schema_migrations (version) VALUES ('20140325175653');
2971
2972 INSERT INTO schema_migrations (version) VALUES ('20140402001908');
2973
2974 INSERT INTO schema_migrations (version) VALUES ('20140407184311');
2975
2976 INSERT INTO schema_migrations (version) VALUES ('20140421140924');
2977
2978 INSERT INTO schema_migrations (version) VALUES ('20140421151939');
2979
2980 INSERT INTO schema_migrations (version) VALUES ('20140421151940');
2981
2982 INSERT INTO schema_migrations (version) VALUES ('20140422011506');
2983
2984 INSERT INTO schema_migrations (version) VALUES ('20140423132913');
2985
2986 INSERT INTO schema_migrations (version) VALUES ('20140423133559');
2987
2988 INSERT INTO schema_migrations (version) VALUES ('20140501165548');
2989
2990 INSERT INTO schema_migrations (version) VALUES ('20140519205916');
2991
2992 INSERT INTO schema_migrations (version) VALUES ('20140527152921');
2993
2994 INSERT INTO schema_migrations (version) VALUES ('20140530200539');
2995
2996 INSERT INTO schema_migrations (version) VALUES ('20140601022548');
2997
2998 INSERT INTO schema_migrations (version) VALUES ('20140602143352');
2999
3000 INSERT INTO schema_migrations (version) VALUES ('20140607150616');
3001
3002 INSERT INTO schema_migrations (version) VALUES ('20140611173003');
3003
3004 INSERT INTO schema_migrations (version) VALUES ('20140627210837');
3005
3006 INSERT INTO schema_migrations (version) VALUES ('20140709172343');
3007
3008 INSERT INTO schema_migrations (version) VALUES ('20140714184006');
3009
3010 INSERT INTO schema_migrations (version) VALUES ('20140811184643');
3011
3012 INSERT INTO schema_migrations (version) VALUES ('20140817035914');
3013
3014 INSERT INTO schema_migrations (version) VALUES ('20140818125735');
3015
3016 INSERT INTO schema_migrations (version) VALUES ('20140826180337');
3017
3018 INSERT INTO schema_migrations (version) VALUES ('20140828141043');
3019
3020 INSERT INTO schema_migrations (version) VALUES ('20140909183946');
3021
3022 INSERT INTO schema_migrations (version) VALUES ('20140911221252');
3023
3024 INSERT INTO schema_migrations (version) VALUES ('20140918141529');
3025
3026 INSERT INTO schema_migrations (version) VALUES ('20140918153541');
3027
3028 INSERT INTO schema_migrations (version) VALUES ('20140918153705');
3029
3030 INSERT INTO schema_migrations (version) VALUES ('20140924091559');
3031
3032 INSERT INTO schema_migrations (version) VALUES ('20141111133038');
3033
3034 INSERT INTO schema_migrations (version) VALUES ('20141208164553');
3035
3036 INSERT INTO schema_migrations (version) VALUES ('20141208174553');
3037
3038 INSERT INTO schema_migrations (version) VALUES ('20141208174653');
3039
3040 INSERT INTO schema_migrations (version) VALUES ('20141208185217');
3041
3042 INSERT INTO schema_migrations (version) VALUES ('20150122175935');
3043
3044 INSERT INTO schema_migrations (version) VALUES ('20150123142953');
3045
3046 INSERT INTO schema_migrations (version) VALUES ('20150203180223');
3047
3048 INSERT INTO schema_migrations (version) VALUES ('20150206210804');
3049
3050 INSERT INTO schema_migrations (version) VALUES ('20150206230342');
3051
3052 INSERT INTO schema_migrations (version) VALUES ('20150216193428');
3053
3054 INSERT INTO schema_migrations (version) VALUES ('20150303210106');
3055
3056 INSERT INTO schema_migrations (version) VALUES ('20150312151136');
3057
3058 INSERT INTO schema_migrations (version) VALUES ('20150317132720');
3059
3060 INSERT INTO schema_migrations (version) VALUES ('20150324152204');
3061
3062 INSERT INTO schema_migrations (version) VALUES ('20150423145759');
3063
3064 INSERT INTO schema_migrations (version) VALUES ('20150512193020');
3065
3066 INSERT INTO schema_migrations (version) VALUES ('20150526180251');
3067
3068 INSERT INTO schema_migrations (version) VALUES ('20151202151426');
3069
3070 INSERT INTO schema_migrations (version) VALUES ('20151215134304');
3071
3072 INSERT INTO schema_migrations (version) VALUES ('20151229214707');
3073
3074 INSERT INTO schema_migrations (version) VALUES ('20160208210629');
3075
3076 INSERT INTO schema_migrations (version) VALUES ('20160209155729');
3077
3078 INSERT INTO schema_migrations (version) VALUES ('20160324144017');
3079
3080 INSERT INTO schema_migrations (version) VALUES ('20160506175108');
3081
3082 INSERT INTO schema_migrations (version) VALUES ('20160509143250');
3083
3084 INSERT INTO schema_migrations (version) VALUES ('20160808151559');
3085
3086 INSERT INTO schema_migrations (version) VALUES ('20160819195557');
3087
3088 INSERT INTO schema_migrations (version) VALUES ('20160819195725');
3089
3090 INSERT INTO schema_migrations (version) VALUES ('20160901210110');
3091
3092 INSERT INTO schema_migrations (version) VALUES ('20160909181442');
3093
3094 INSERT INTO schema_migrations (version) VALUES ('20160926194129');
3095
3096 INSERT INTO schema_migrations (version) VALUES ('20161019171346');
3097
3098 INSERT INTO schema_migrations (version) VALUES ('20161111143147');
3099
3100 INSERT INTO schema_migrations (version) VALUES ('20161115171221');
3101
3102 INSERT INTO schema_migrations (version) VALUES ('20161115174218');
3103
3104 INSERT INTO schema_migrations (version) VALUES ('20161213172944');
3105
3106 INSERT INTO schema_migrations (version) VALUES ('20161222153434');
3107
3108 INSERT INTO schema_migrations (version) VALUES ('20161223090712');
3109
3110 INSERT INTO schema_migrations (version) VALUES ('20170102153111');
3111
3112 INSERT INTO schema_migrations (version) VALUES ('20170105160301');
3113
3114 INSERT INTO schema_migrations (version) VALUES ('20170105160302');
3115
3116 INSERT INTO schema_migrations (version) VALUES ('20170216170823');
3117
3118 INSERT INTO schema_migrations (version) VALUES ('20170301225558');
3119
3120 INSERT INTO schema_migrations (version) VALUES ('20170319063406');
3121
3122 INSERT INTO schema_migrations (version) VALUES ('20170328215436');
3123
3124 INSERT INTO schema_migrations (version) VALUES ('20170330012505');
3125
3126 INSERT INTO schema_migrations (version) VALUES ('20170419173031');
3127
3128 INSERT INTO schema_migrations (version) VALUES ('20170419173712');
3129
3130 INSERT INTO schema_migrations (version) VALUES ('20170419175801');
3131
3132 INSERT INTO schema_migrations (version) VALUES ('20170628185847');
3133
3134 INSERT INTO schema_migrations (version) VALUES ('20170704160233');
3135
3136 INSERT INTO schema_migrations (version) VALUES ('20170706141334');
3137
3138 INSERT INTO schema_migrations (version) VALUES ('20170824202826');
3139
3140 INSERT INTO schema_migrations (version) VALUES ('20170906224040');
3141
3142 INSERT INTO schema_migrations (version) VALUES ('20171027183824');
3143
3144 INSERT INTO schema_migrations (version) VALUES ('20171208203841');
3145
3146 INSERT INTO schema_migrations (version) VALUES ('20171212153352');
3147
3148 INSERT INTO schema_migrations (version) VALUES ('20180216203422');
3149
3150 INSERT INTO schema_migrations (version) VALUES ('20180228220311');
3151
3152 INSERT INTO schema_migrations (version) VALUES ('20180313180114');
3153
3154 INSERT INTO schema_migrations (version) VALUES ('20180501182859');
3155
3156 INSERT INTO schema_migrations (version) VALUES ('20180514135529');
3157
3158 INSERT INTO schema_migrations (version) VALUES ('20180607175050');
3159
3160 INSERT INTO schema_migrations (version) VALUES ('20180608123145');
3161
3162 INSERT INTO schema_migrations (version) VALUES ('20180806133039');
3163
3164 INSERT INTO schema_migrations (version) VALUES ('20180820130357');
3165
3166 INSERT INTO schema_migrations (version) VALUES ('20180820132617');
3167
3168 INSERT INTO schema_migrations (version) VALUES ('20180820135808');
3169
3170 INSERT INTO schema_migrations (version) VALUES ('20180824152014');
3171
3172 INSERT INTO schema_migrations (version) VALUES ('20180824155207');
3173
3174 INSERT INTO schema_migrations (version) VALUES ('20180904110712');
3175
3176 INSERT INTO schema_migrations (version) VALUES ('20180917205609');
3177
3178 INSERT INTO schema_migrations (version) VALUES ('20181005192222');
3179
3180 INSERT INTO schema_migrations (version) VALUES ('20181011184200');
3181