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