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