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