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