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