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