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