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