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