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