Merge branch 'master' into 3036-collection-uuids
[arvados.git] / services / api / db / structure.sql
1 --
2 -- PostgreSQL database dump
3 --
4
5 SET statement_timeout = 0;
6 SET client_encoding = 'UTF8';
7 SET standard_conforming_strings = on;
8 SET check_function_bodies = false;
9 SET client_min_messages = warning;
10
11 --
12 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
13 --
14
15 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
16
17
18 --
19 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
20 --
21
22 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
23
24
25 SET search_path = public, pg_catalog;
26
27 SET default_tablespace = '';
28
29 SET default_with_oids = false;
30
31 --
32 -- Name: api_client_authorizations; Type: TABLE; Schema: public; Owner: -; Tablespace: 
33 --
34
35 CREATE TABLE api_client_authorizations (
36     id integer NOT NULL,
37     api_token character varying(255) NOT NULL,
38     api_client_id integer NOT NULL,
39     user_id integer NOT NULL,
40     created_by_ip_address character varying(255),
41     last_used_by_ip_address character varying(255),
42     last_used_at timestamp without time zone,
43     expires_at timestamp without time zone,
44     created_at timestamp without time zone NOT NULL,
45     updated_at timestamp without time zone NOT NULL,
46     default_owner_uuid character varying(255),
47     scopes text DEFAULT '---
48 - all
49 '::text NOT NULL
50 );
51
52
53 --
54 -- Name: api_client_authorizations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
55 --
56
57 CREATE SEQUENCE api_client_authorizations_id_seq
58     START WITH 1
59     INCREMENT BY 1
60     NO MINVALUE
61     NO MAXVALUE
62     CACHE 1;
63
64
65 --
66 -- Name: api_client_authorizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
67 --
68
69 ALTER SEQUENCE api_client_authorizations_id_seq OWNED BY api_client_authorizations.id;
70
71
72 --
73 -- Name: api_clients; Type: TABLE; Schema: public; Owner: -; Tablespace: 
74 --
75
76 CREATE TABLE api_clients (
77     id integer NOT NULL,
78     uuid character varying(255),
79     owner_uuid character varying(255),
80     modified_by_client_uuid character varying(255),
81     modified_by_user_uuid character varying(255),
82     modified_at timestamp without time zone,
83     name character varying(255),
84     url_prefix character varying(255),
85     created_at timestamp without time zone NOT NULL,
86     updated_at timestamp without time zone NOT NULL,
87     is_trusted boolean DEFAULT false
88 );
89
90
91 --
92 -- Name: api_clients_id_seq; Type: SEQUENCE; Schema: public; Owner: -
93 --
94
95 CREATE SEQUENCE api_clients_id_seq
96     START WITH 1
97     INCREMENT BY 1
98     NO MINVALUE
99     NO MAXVALUE
100     CACHE 1;
101
102
103 --
104 -- Name: api_clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
105 --
106
107 ALTER SEQUENCE api_clients_id_seq OWNED BY api_clients.id;
108
109
110 --
111 -- Name: authorized_keys; Type: TABLE; Schema: public; Owner: -; Tablespace: 
112 --
113
114 CREATE TABLE authorized_keys (
115     id integer NOT NULL,
116     uuid character varying(255) NOT NULL,
117     owner_uuid character varying(255) NOT NULL,
118     modified_by_client_uuid character varying(255),
119     modified_by_user_uuid character varying(255),
120     modified_at timestamp without time zone,
121     name character varying(255),
122     key_type character varying(255),
123     authorized_user_uuid character varying(255),
124     public_key text,
125     expires_at timestamp without time zone,
126     created_at timestamp without time zone NOT NULL,
127     updated_at timestamp without time zone NOT NULL
128 );
129
130
131 --
132 -- Name: authorized_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
133 --
134
135 CREATE SEQUENCE authorized_keys_id_seq
136     START WITH 1
137     INCREMENT BY 1
138     NO MINVALUE
139     NO MAXVALUE
140     CACHE 1;
141
142
143 --
144 -- Name: authorized_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
145 --
146
147 ALTER SEQUENCE authorized_keys_id_seq OWNED BY authorized_keys.id;
148
149
150 --
151 -- Name: collections; Type: TABLE; Schema: public; Owner: -; Tablespace: 
152 --
153
154 CREATE TABLE collections (
155     id integer NOT NULL,
156     owner_uuid character varying(255),
157     created_at timestamp without time zone NOT NULL,
158     modified_by_client_uuid character varying(255),
159     modified_by_user_uuid character varying(255),
160     modified_at timestamp without time zone,
161     portable_data_hash character varying(255),
162     redundancy integer,
163     redundancy_confirmed_by_client_uuid character varying(255),
164     redundancy_confirmed_at timestamp without time zone,
165     redundancy_confirmed_as integer,
166     updated_at timestamp without time zone NOT NULL,
167     uuid character varying(255),
168     manifest_text text,
169     name character varying(255),
170     description character varying(255),
171     properties text,
172     expire_time date
173 );
174
175
176 --
177 -- Name: collections_id_seq; Type: SEQUENCE; Schema: public; Owner: -
178 --
179
180 CREATE SEQUENCE collections_id_seq
181     START WITH 1
182     INCREMENT BY 1
183     NO MINVALUE
184     NO MAXVALUE
185     CACHE 1;
186
187
188 --
189 -- Name: collections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
190 --
191
192 ALTER SEQUENCE collections_id_seq OWNED BY collections.id;
193
194
195 --
196 -- Name: commit_ancestors; Type: TABLE; Schema: public; Owner: -; Tablespace: 
197 --
198
199 CREATE TABLE commit_ancestors (
200     id integer NOT NULL,
201     repository_name character varying(255),
202     descendant character varying(255) NOT NULL,
203     ancestor character varying(255) NOT NULL,
204     "is" boolean DEFAULT false NOT NULL,
205     created_at timestamp without time zone NOT NULL,
206     updated_at timestamp without time zone NOT NULL
207 );
208
209
210 --
211 -- Name: commit_ancestors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
212 --
213
214 CREATE SEQUENCE commit_ancestors_id_seq
215     START WITH 1
216     INCREMENT BY 1
217     NO MINVALUE
218     NO MAXVALUE
219     CACHE 1;
220
221
222 --
223 -- Name: commit_ancestors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
224 --
225
226 ALTER SEQUENCE commit_ancestors_id_seq OWNED BY commit_ancestors.id;
227
228
229 --
230 -- Name: commits; Type: TABLE; Schema: public; Owner: -; Tablespace: 
231 --
232
233 CREATE TABLE commits (
234     id integer NOT NULL,
235     repository_name character varying(255),
236     sha1 character varying(255),
237     message character varying(255),
238     created_at timestamp without time zone NOT NULL,
239     updated_at timestamp without time zone NOT NULL
240 );
241
242
243 --
244 -- Name: commits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
245 --
246
247 CREATE SEQUENCE commits_id_seq
248     START WITH 1
249     INCREMENT BY 1
250     NO MINVALUE
251     NO MAXVALUE
252     CACHE 1;
253
254
255 --
256 -- Name: commits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
257 --
258
259 ALTER SEQUENCE commits_id_seq OWNED BY commits.id;
260
261
262 --
263 -- Name: groups; Type: TABLE; Schema: public; Owner: -; Tablespace: 
264 --
265
266 CREATE TABLE groups (
267     id integer NOT NULL,
268     uuid character varying(255),
269     owner_uuid character varying(255),
270     created_at timestamp without time zone NOT NULL,
271     modified_by_client_uuid character varying(255),
272     modified_by_user_uuid character varying(255),
273     modified_at timestamp without time zone,
274     name character varying(255) NOT NULL,
275     description text,
276     updated_at timestamp without time zone NOT NULL,
277     group_class character varying(255)
278 );
279
280
281 --
282 -- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
283 --
284
285 CREATE SEQUENCE groups_id_seq
286     START WITH 1
287     INCREMENT BY 1
288     NO MINVALUE
289     NO MAXVALUE
290     CACHE 1;
291
292
293 --
294 -- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
295 --
296
297 ALTER SEQUENCE groups_id_seq OWNED BY groups.id;
298
299
300 --
301 -- Name: humans; Type: TABLE; Schema: public; Owner: -; Tablespace: 
302 --
303
304 CREATE TABLE humans (
305     id integer NOT NULL,
306     uuid character varying(255) NOT NULL,
307     owner_uuid character varying(255) NOT NULL,
308     modified_by_client_uuid character varying(255),
309     modified_by_user_uuid character varying(255),
310     modified_at timestamp without time zone,
311     properties text,
312     created_at timestamp without time zone NOT NULL,
313     updated_at timestamp without time zone NOT NULL
314 );
315
316
317 --
318 -- Name: humans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
319 --
320
321 CREATE SEQUENCE humans_id_seq
322     START WITH 1
323     INCREMENT BY 1
324     NO MINVALUE
325     NO MAXVALUE
326     CACHE 1;
327
328
329 --
330 -- Name: humans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
331 --
332
333 ALTER SEQUENCE humans_id_seq OWNED BY humans.id;
334
335
336 --
337 -- Name: job_tasks; Type: TABLE; Schema: public; Owner: -; Tablespace: 
338 --
339
340 CREATE TABLE job_tasks (
341     id integer NOT NULL,
342     uuid character varying(255),
343     owner_uuid character varying(255),
344     modified_by_client_uuid character varying(255),
345     modified_by_user_uuid character varying(255),
346     modified_at timestamp without time zone,
347     job_uuid character varying(255),
348     sequence integer,
349     parameters text,
350     output text,
351     progress double precision,
352     success boolean,
353     created_at timestamp without time zone NOT NULL,
354     updated_at timestamp without time zone NOT NULL,
355     created_by_job_task_uuid character varying(255),
356     qsequence bigint
357 );
358
359
360 --
361 -- Name: job_tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
362 --
363
364 CREATE SEQUENCE job_tasks_id_seq
365     START WITH 1
366     INCREMENT BY 1
367     NO MINVALUE
368     NO MAXVALUE
369     CACHE 1;
370
371
372 --
373 -- Name: job_tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
374 --
375
376 ALTER SEQUENCE job_tasks_id_seq OWNED BY job_tasks.id;
377
378
379 --
380 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE; Schema: public; Owner: -
381 --
382
383 CREATE SEQUENCE job_tasks_qsequence_seq
384     START WITH 1
385     INCREMENT BY 1
386     NO MINVALUE
387     NO MAXVALUE
388     CACHE 1;
389
390
391 --
392 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
393 --
394
395 ALTER SEQUENCE job_tasks_qsequence_seq OWNED BY job_tasks.qsequence;
396
397
398 --
399 -- Name: jobs; Type: TABLE; Schema: public; Owner: -; Tablespace: 
400 --
401
402 CREATE TABLE jobs (
403     id integer NOT NULL,
404     uuid character varying(255),
405     owner_uuid character varying(255),
406     modified_by_client_uuid character varying(255),
407     modified_by_user_uuid character varying(255),
408     modified_at timestamp without time zone,
409     submit_id character varying(255),
410     script character varying(255),
411     script_version character varying(255),
412     script_parameters text,
413     cancelled_by_client_uuid character varying(255),
414     cancelled_by_user_uuid character varying(255),
415     cancelled_at timestamp without time zone,
416     started_at timestamp without time zone,
417     finished_at timestamp without time zone,
418     running boolean,
419     success boolean,
420     output character varying(255),
421     created_at timestamp without time zone NOT NULL,
422     updated_at timestamp without time zone NOT NULL,
423     priority character varying(255),
424     is_locked_by_uuid character varying(255),
425     log character varying(255),
426     tasks_summary text,
427     runtime_constraints text,
428     nondeterministic boolean,
429     repository character varying(255),
430     output_is_persistent boolean DEFAULT false NOT NULL,
431     supplied_script_version character varying(255),
432     docker_image_locator character varying(255),
433     name character varying(255),
434     description text
435 );
436
437
438 --
439 -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
440 --
441
442 CREATE SEQUENCE jobs_id_seq
443     START WITH 1
444     INCREMENT BY 1
445     NO MINVALUE
446     NO MAXVALUE
447     CACHE 1;
448
449
450 --
451 -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
452 --
453
454 ALTER SEQUENCE jobs_id_seq OWNED BY jobs.id;
455
456
457 --
458 -- Name: keep_disks; Type: TABLE; Schema: public; Owner: -; Tablespace: 
459 --
460
461 CREATE TABLE keep_disks (
462     id integer NOT NULL,
463     uuid character varying(255) NOT NULL,
464     owner_uuid character varying(255) NOT NULL,
465     modified_by_client_uuid character varying(255),
466     modified_by_user_uuid character varying(255),
467     modified_at timestamp without time zone,
468     ping_secret character varying(255) NOT NULL,
469     node_uuid character varying(255),
470     filesystem_uuid character varying(255),
471     bytes_total integer,
472     bytes_free integer,
473     is_readable boolean DEFAULT true NOT NULL,
474     is_writable boolean DEFAULT true NOT NULL,
475     last_read_at timestamp without time zone,
476     last_write_at timestamp without time zone,
477     last_ping_at timestamp without time zone,
478     created_at timestamp without time zone NOT NULL,
479     updated_at timestamp without time zone NOT NULL,
480     keep_service_uuid character varying(255)
481 );
482
483
484 --
485 -- Name: keep_disks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
486 --
487
488 CREATE SEQUENCE keep_disks_id_seq
489     START WITH 1
490     INCREMENT BY 1
491     NO MINVALUE
492     NO MAXVALUE
493     CACHE 1;
494
495
496 --
497 -- Name: keep_disks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
498 --
499
500 ALTER SEQUENCE keep_disks_id_seq OWNED BY keep_disks.id;
501
502
503 --
504 -- Name: keep_services; Type: TABLE; Schema: public; Owner: -; Tablespace: 
505 --
506
507 CREATE TABLE keep_services (
508     id integer NOT NULL,
509     uuid character varying(255) NOT NULL,
510     owner_uuid character varying(255) NOT NULL,
511     modified_by_client_uuid character varying(255),
512     modified_by_user_uuid character varying(255),
513     modified_at timestamp without time zone,
514     service_host character varying(255),
515     service_port integer,
516     service_ssl_flag boolean,
517     service_type character varying(255),
518     created_at timestamp without time zone NOT NULL,
519     updated_at timestamp without time zone NOT NULL
520 );
521
522
523 --
524 -- Name: keep_services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
525 --
526
527 CREATE SEQUENCE keep_services_id_seq
528     START WITH 1
529     INCREMENT BY 1
530     NO MINVALUE
531     NO MAXVALUE
532     CACHE 1;
533
534
535 --
536 -- Name: keep_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
537 --
538
539 ALTER SEQUENCE keep_services_id_seq OWNED BY keep_services.id;
540
541
542 --
543 -- Name: links; Type: TABLE; Schema: public; Owner: -; Tablespace: 
544 --
545
546 CREATE TABLE links (
547     id integer NOT NULL,
548     uuid character varying(255),
549     owner_uuid character varying(255),
550     created_at timestamp without time zone NOT NULL,
551     modified_by_client_uuid character varying(255),
552     modified_by_user_uuid character varying(255),
553     modified_at timestamp without time zone,
554     tail_uuid character varying(255),
555     link_class character varying(255),
556     name character varying(255),
557     head_uuid character varying(255),
558     properties text,
559     updated_at timestamp without time zone NOT NULL
560 );
561
562
563 --
564 -- Name: links_id_seq; Type: SEQUENCE; Schema: public; Owner: -
565 --
566
567 CREATE SEQUENCE links_id_seq
568     START WITH 1
569     INCREMENT BY 1
570     NO MINVALUE
571     NO MAXVALUE
572     CACHE 1;
573
574
575 --
576 -- Name: links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
577 --
578
579 ALTER SEQUENCE links_id_seq OWNED BY links.id;
580
581
582 --
583 -- Name: logs; Type: TABLE; Schema: public; Owner: -; Tablespace: 
584 --
585
586 CREATE TABLE logs (
587     id integer NOT NULL,
588     uuid character varying(255),
589     owner_uuid character varying(255),
590     modified_by_client_uuid character varying(255),
591     modified_by_user_uuid character varying(255),
592     object_uuid character varying(255),
593     event_at timestamp without time zone,
594     event_type character varying(255),
595     summary text,
596     properties text,
597     created_at timestamp without time zone NOT NULL,
598     updated_at timestamp without time zone NOT NULL,
599     modified_at timestamp without time zone,
600     object_owner_uuid character varying(255)
601 );
602
603
604 --
605 -- Name: logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
606 --
607
608 CREATE SEQUENCE logs_id_seq
609     START WITH 1
610     INCREMENT BY 1
611     NO MINVALUE
612     NO MAXVALUE
613     CACHE 1;
614
615
616 --
617 -- Name: logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
618 --
619
620 ALTER SEQUENCE logs_id_seq OWNED BY logs.id;
621
622
623 --
624 -- Name: nodes; Type: TABLE; Schema: public; Owner: -; Tablespace: 
625 --
626
627 CREATE TABLE nodes (
628     id integer NOT NULL,
629     uuid character varying(255),
630     owner_uuid character varying(255),
631     created_at timestamp without time zone NOT NULL,
632     modified_by_client_uuid character varying(255),
633     modified_by_user_uuid character varying(255),
634     modified_at timestamp without time zone,
635     slot_number integer,
636     hostname character varying(255),
637     domain character varying(255),
638     ip_address character varying(255),
639     first_ping_at timestamp without time zone,
640     last_ping_at timestamp without time zone,
641     info text,
642     updated_at timestamp without time zone NOT NULL
643 );
644
645
646 --
647 -- Name: nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
648 --
649
650 CREATE SEQUENCE nodes_id_seq
651     START WITH 1
652     INCREMENT BY 1
653     NO MINVALUE
654     NO MAXVALUE
655     CACHE 1;
656
657
658 --
659 -- Name: nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
660 --
661
662 ALTER SEQUENCE nodes_id_seq OWNED BY nodes.id;
663
664
665 --
666 -- Name: pipeline_instances; Type: TABLE; Schema: public; Owner: -; Tablespace: 
667 --
668
669 CREATE TABLE pipeline_instances (
670     id integer NOT NULL,
671     uuid character varying(255),
672     owner_uuid character varying(255),
673     created_at timestamp without time zone NOT NULL,
674     modified_by_client_uuid character varying(255),
675     modified_by_user_uuid character varying(255),
676     modified_at timestamp without time zone,
677     pipeline_template_uuid character varying(255),
678     name character varying(255),
679     components text,
680     updated_at timestamp without time zone NOT NULL,
681     properties text,
682     state character varying(255),
683     components_summary text,
684     description text
685 );
686
687
688 --
689 -- Name: pipeline_instances_id_seq; Type: SEQUENCE; Schema: public; Owner: -
690 --
691
692 CREATE SEQUENCE pipeline_instances_id_seq
693     START WITH 1
694     INCREMENT BY 1
695     NO MINVALUE
696     NO MAXVALUE
697     CACHE 1;
698
699
700 --
701 -- Name: pipeline_instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
702 --
703
704 ALTER SEQUENCE pipeline_instances_id_seq OWNED BY pipeline_instances.id;
705
706
707 --
708 -- Name: pipeline_templates; Type: TABLE; Schema: public; Owner: -; Tablespace: 
709 --
710
711 CREATE TABLE pipeline_templates (
712     id integer NOT NULL,
713     uuid character varying(255),
714     owner_uuid character varying(255),
715     created_at timestamp without time zone NOT NULL,
716     modified_by_client_uuid character varying(255),
717     modified_by_user_uuid character varying(255),
718     modified_at timestamp without time zone,
719     name character varying(255),
720     components text,
721     updated_at timestamp without time zone NOT NULL,
722     description text
723 );
724
725
726 --
727 -- Name: pipeline_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
728 --
729
730 CREATE SEQUENCE pipeline_templates_id_seq
731     START WITH 1
732     INCREMENT BY 1
733     NO MINVALUE
734     NO MAXVALUE
735     CACHE 1;
736
737
738 --
739 -- Name: pipeline_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
740 --
741
742 ALTER SEQUENCE pipeline_templates_id_seq OWNED BY pipeline_templates.id;
743
744
745 --
746 -- Name: repositories; Type: TABLE; Schema: public; Owner: -; Tablespace: 
747 --
748
749 CREATE TABLE repositories (
750     id integer NOT NULL,
751     uuid character varying(255) NOT NULL,
752     owner_uuid character varying(255) NOT NULL,
753     modified_by_client_uuid character varying(255),
754     modified_by_user_uuid character varying(255),
755     modified_at timestamp without time zone,
756     name character varying(255),
757     fetch_url character varying(255),
758     push_url character varying(255),
759     created_at timestamp without time zone NOT NULL,
760     updated_at timestamp without time zone NOT NULL
761 );
762
763
764 --
765 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
766 --
767
768 CREATE SEQUENCE repositories_id_seq
769     START WITH 1
770     INCREMENT BY 1
771     NO MINVALUE
772     NO MAXVALUE
773     CACHE 1;
774
775
776 --
777 -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
778 --
779
780 ALTER SEQUENCE repositories_id_seq OWNED BY repositories.id;
781
782
783 --
784 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace: 
785 --
786
787 CREATE TABLE schema_migrations (
788     version character varying(255) NOT NULL
789 );
790
791
792 --
793 -- Name: specimens; Type: TABLE; Schema: public; Owner: -; Tablespace: 
794 --
795
796 CREATE TABLE specimens (
797     id integer NOT NULL,
798     uuid character varying(255),
799     owner_uuid character varying(255),
800     created_at timestamp without time zone NOT NULL,
801     modified_by_client_uuid character varying(255),
802     modified_by_user_uuid character varying(255),
803     modified_at timestamp without time zone,
804     material character varying(255),
805     updated_at timestamp without time zone NOT NULL,
806     properties text
807 );
808
809
810 --
811 -- Name: specimens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
812 --
813
814 CREATE SEQUENCE specimens_id_seq
815     START WITH 1
816     INCREMENT BY 1
817     NO MINVALUE
818     NO MAXVALUE
819     CACHE 1;
820
821
822 --
823 -- Name: specimens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
824 --
825
826 ALTER SEQUENCE specimens_id_seq OWNED BY specimens.id;
827
828
829 --
830 -- Name: traits; Type: TABLE; Schema: public; Owner: -; Tablespace: 
831 --
832
833 CREATE TABLE traits (
834     id integer NOT NULL,
835     uuid character varying(255) NOT NULL,
836     owner_uuid character varying(255) NOT NULL,
837     modified_by_client_uuid character varying(255),
838     modified_by_user_uuid character varying(255),
839     modified_at timestamp without time zone,
840     name character varying(255),
841     properties text,
842     created_at timestamp without time zone NOT NULL,
843     updated_at timestamp without time zone NOT NULL
844 );
845
846
847 --
848 -- Name: traits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
849 --
850
851 CREATE SEQUENCE traits_id_seq
852     START WITH 1
853     INCREMENT BY 1
854     NO MINVALUE
855     NO MAXVALUE
856     CACHE 1;
857
858
859 --
860 -- Name: traits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
861 --
862
863 ALTER SEQUENCE traits_id_seq OWNED BY traits.id;
864
865
866 --
867 -- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace: 
868 --
869
870 CREATE TABLE users (
871     id integer NOT NULL,
872     uuid character varying(255),
873     owner_uuid character varying(255),
874     created_at timestamp without time zone NOT NULL,
875     modified_by_client_uuid character varying(255),
876     modified_by_user_uuid character varying(255),
877     modified_at timestamp without time zone,
878     email character varying(255),
879     first_name character varying(255),
880     last_name character varying(255),
881     identity_url character varying(255),
882     is_admin boolean,
883     prefs text,
884     updated_at timestamp without time zone NOT NULL,
885     default_owner_uuid character varying(255),
886     is_active boolean DEFAULT false
887 );
888
889
890 --
891 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
892 --
893
894 CREATE SEQUENCE users_id_seq
895     START WITH 1
896     INCREMENT BY 1
897     NO MINVALUE
898     NO MAXVALUE
899     CACHE 1;
900
901
902 --
903 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
904 --
905
906 ALTER SEQUENCE users_id_seq OWNED BY users.id;
907
908
909 --
910 -- Name: virtual_machines; Type: TABLE; Schema: public; Owner: -; Tablespace: 
911 --
912
913 CREATE TABLE virtual_machines (
914     id integer NOT NULL,
915     uuid character varying(255) NOT NULL,
916     owner_uuid character varying(255) NOT NULL,
917     modified_by_client_uuid character varying(255),
918     modified_by_user_uuid character varying(255),
919     modified_at timestamp without time zone,
920     hostname character varying(255),
921     created_at timestamp without time zone NOT NULL,
922     updated_at timestamp without time zone NOT NULL
923 );
924
925
926 --
927 -- Name: virtual_machines_id_seq; Type: SEQUENCE; Schema: public; Owner: -
928 --
929
930 CREATE SEQUENCE virtual_machines_id_seq
931     START WITH 1
932     INCREMENT BY 1
933     NO MINVALUE
934     NO MAXVALUE
935     CACHE 1;
936
937
938 --
939 -- Name: virtual_machines_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
940 --
941
942 ALTER SEQUENCE virtual_machines_id_seq OWNED BY virtual_machines.id;
943
944
945 --
946 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
947 --
948
949 ALTER TABLE ONLY api_client_authorizations ALTER COLUMN id SET DEFAULT nextval('api_client_authorizations_id_seq'::regclass);
950
951
952 --
953 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
954 --
955
956 ALTER TABLE ONLY api_clients ALTER COLUMN id SET DEFAULT nextval('api_clients_id_seq'::regclass);
957
958
959 --
960 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
961 --
962
963 ALTER TABLE ONLY authorized_keys ALTER COLUMN id SET DEFAULT nextval('authorized_keys_id_seq'::regclass);
964
965
966 --
967 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
968 --
969
970 ALTER TABLE ONLY collections ALTER COLUMN id SET DEFAULT nextval('collections_id_seq'::regclass);
971
972
973 --
974 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
975 --
976
977 ALTER TABLE ONLY commit_ancestors ALTER COLUMN id SET DEFAULT nextval('commit_ancestors_id_seq'::regclass);
978
979
980 --
981 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
982 --
983
984 ALTER TABLE ONLY commits ALTER COLUMN id SET DEFAULT nextval('commits_id_seq'::regclass);
985
986
987 --
988 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
989 --
990
991 ALTER TABLE ONLY groups ALTER COLUMN id SET DEFAULT nextval('groups_id_seq'::regclass);
992
993
994 --
995 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
996 --
997
998 ALTER TABLE ONLY humans ALTER COLUMN id SET DEFAULT nextval('humans_id_seq'::regclass);
999
1000
1001 --
1002 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1003 --
1004
1005 ALTER TABLE ONLY job_tasks ALTER COLUMN id SET DEFAULT nextval('job_tasks_id_seq'::regclass);
1006
1007
1008 --
1009 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1010 --
1011
1012 ALTER TABLE ONLY jobs ALTER COLUMN id SET DEFAULT nextval('jobs_id_seq'::regclass);
1013
1014
1015 --
1016 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1017 --
1018
1019 ALTER TABLE ONLY keep_disks ALTER COLUMN id SET DEFAULT nextval('keep_disks_id_seq'::regclass);
1020
1021
1022 --
1023 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1024 --
1025
1026 ALTER TABLE ONLY keep_services ALTER COLUMN id SET DEFAULT nextval('keep_services_id_seq'::regclass);
1027
1028
1029 --
1030 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1031 --
1032
1033 ALTER TABLE ONLY links ALTER COLUMN id SET DEFAULT nextval('links_id_seq'::regclass);
1034
1035
1036 --
1037 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1038 --
1039
1040 ALTER TABLE ONLY logs ALTER COLUMN id SET DEFAULT nextval('logs_id_seq'::regclass);
1041
1042
1043 --
1044 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1045 --
1046
1047 ALTER TABLE ONLY nodes ALTER COLUMN id SET DEFAULT nextval('nodes_id_seq'::regclass);
1048
1049
1050 --
1051 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1052 --
1053
1054 ALTER TABLE ONLY pipeline_instances ALTER COLUMN id SET DEFAULT nextval('pipeline_instances_id_seq'::regclass);
1055
1056
1057 --
1058 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1059 --
1060
1061 ALTER TABLE ONLY pipeline_templates ALTER COLUMN id SET DEFAULT nextval('pipeline_templates_id_seq'::regclass);
1062
1063
1064 --
1065 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1066 --
1067
1068 ALTER TABLE ONLY repositories ALTER COLUMN id SET DEFAULT nextval('repositories_id_seq'::regclass);
1069
1070
1071 --
1072 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1073 --
1074
1075 ALTER TABLE ONLY specimens ALTER COLUMN id SET DEFAULT nextval('specimens_id_seq'::regclass);
1076
1077
1078 --
1079 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1080 --
1081
1082 ALTER TABLE ONLY traits ALTER COLUMN id SET DEFAULT nextval('traits_id_seq'::regclass);
1083
1084
1085 --
1086 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1087 --
1088
1089 ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
1090
1091
1092 --
1093 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1094 --
1095
1096 ALTER TABLE ONLY virtual_machines ALTER COLUMN id SET DEFAULT nextval('virtual_machines_id_seq'::regclass);
1097
1098
1099 --
1100 -- Name: api_client_authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1101 --
1102
1103 ALTER TABLE ONLY api_client_authorizations
1104     ADD CONSTRAINT api_client_authorizations_pkey PRIMARY KEY (id);
1105
1106
1107 --
1108 -- Name: api_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1109 --
1110
1111 ALTER TABLE ONLY api_clients
1112     ADD CONSTRAINT api_clients_pkey PRIMARY KEY (id);
1113
1114
1115 --
1116 -- Name: authorized_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1117 --
1118
1119 ALTER TABLE ONLY authorized_keys
1120     ADD CONSTRAINT authorized_keys_pkey PRIMARY KEY (id);
1121
1122
1123 --
1124 -- Name: collections_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1125 --
1126
1127 ALTER TABLE ONLY collections
1128     ADD CONSTRAINT collections_pkey PRIMARY KEY (id);
1129
1130
1131 --
1132 -- Name: commit_ancestors_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1133 --
1134
1135 ALTER TABLE ONLY commit_ancestors
1136     ADD CONSTRAINT commit_ancestors_pkey PRIMARY KEY (id);
1137
1138
1139 --
1140 -- Name: commits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1141 --
1142
1143 ALTER TABLE ONLY commits
1144     ADD CONSTRAINT commits_pkey PRIMARY KEY (id);
1145
1146
1147 --
1148 -- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1149 --
1150
1151 ALTER TABLE ONLY groups
1152     ADD CONSTRAINT groups_pkey PRIMARY KEY (id);
1153
1154
1155 --
1156 -- Name: humans_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1157 --
1158
1159 ALTER TABLE ONLY humans
1160     ADD CONSTRAINT humans_pkey PRIMARY KEY (id);
1161
1162
1163 --
1164 -- Name: job_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1165 --
1166
1167 ALTER TABLE ONLY job_tasks
1168     ADD CONSTRAINT job_tasks_pkey PRIMARY KEY (id);
1169
1170
1171 --
1172 -- Name: jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1173 --
1174
1175 ALTER TABLE ONLY jobs
1176     ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
1177
1178
1179 --
1180 -- Name: keep_disks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1181 --
1182
1183 ALTER TABLE ONLY keep_disks
1184     ADD CONSTRAINT keep_disks_pkey PRIMARY KEY (id);
1185
1186
1187 --
1188 -- Name: keep_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1189 --
1190
1191 ALTER TABLE ONLY keep_services
1192     ADD CONSTRAINT keep_services_pkey PRIMARY KEY (id);
1193
1194
1195 --
1196 -- Name: links_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1197 --
1198
1199 ALTER TABLE ONLY links
1200     ADD CONSTRAINT links_pkey PRIMARY KEY (id);
1201
1202
1203 --
1204 -- Name: logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1205 --
1206
1207 ALTER TABLE ONLY logs
1208     ADD CONSTRAINT logs_pkey PRIMARY KEY (id);
1209
1210
1211 --
1212 -- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1213 --
1214
1215 ALTER TABLE ONLY nodes
1216     ADD CONSTRAINT nodes_pkey PRIMARY KEY (id);
1217
1218
1219 --
1220 -- Name: pipeline_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1221 --
1222
1223 ALTER TABLE ONLY pipeline_instances
1224     ADD CONSTRAINT pipeline_instances_pkey PRIMARY KEY (id);
1225
1226
1227 --
1228 -- Name: pipeline_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1229 --
1230
1231 ALTER TABLE ONLY pipeline_templates
1232     ADD CONSTRAINT pipeline_templates_pkey PRIMARY KEY (id);
1233
1234
1235 --
1236 -- Name: repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1237 --
1238
1239 ALTER TABLE ONLY repositories
1240     ADD CONSTRAINT repositories_pkey PRIMARY KEY (id);
1241
1242
1243 --
1244 -- Name: specimens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1245 --
1246
1247 ALTER TABLE ONLY specimens
1248     ADD CONSTRAINT specimens_pkey PRIMARY KEY (id);
1249
1250
1251 --
1252 -- Name: traits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1253 --
1254
1255 ALTER TABLE ONLY traits
1256     ADD CONSTRAINT traits_pkey PRIMARY KEY (id);
1257
1258
1259 --
1260 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1261 --
1262
1263 ALTER TABLE ONLY users
1264     ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1265
1266
1267 --
1268 -- Name: virtual_machines_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1269 --
1270
1271 ALTER TABLE ONLY virtual_machines
1272     ADD CONSTRAINT virtual_machines_pkey PRIMARY KEY (id);
1273
1274
1275 --
1276 -- Name: collection_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1277 --
1278
1279 CREATE UNIQUE INDEX collection_owner_uuid_name_unique ON collections USING btree (owner_uuid, name);
1280
1281
1282 --
1283 -- Name: groups_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1284 --
1285
1286 CREATE UNIQUE INDEX groups_owner_uuid_name_unique ON groups USING btree (owner_uuid, name);
1287
1288
1289 --
1290 -- Name: index_api_client_authorizations_on_api_client_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1291 --
1292
1293 CREATE INDEX index_api_client_authorizations_on_api_client_id ON api_client_authorizations USING btree (api_client_id);
1294
1295
1296 --
1297 -- Name: index_api_client_authorizations_on_api_token; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1298 --
1299
1300 CREATE UNIQUE INDEX index_api_client_authorizations_on_api_token ON api_client_authorizations USING btree (api_token);
1301
1302
1303 --
1304 -- Name: index_api_client_authorizations_on_expires_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1305 --
1306
1307 CREATE INDEX index_api_client_authorizations_on_expires_at ON api_client_authorizations USING btree (expires_at);
1308
1309
1310 --
1311 -- Name: index_api_client_authorizations_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1312 --
1313
1314 CREATE INDEX index_api_client_authorizations_on_user_id ON api_client_authorizations USING btree (user_id);
1315
1316
1317 --
1318 -- Name: index_api_clients_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1319 --
1320
1321 CREATE INDEX index_api_clients_on_created_at ON api_clients USING btree (created_at);
1322
1323
1324 --
1325 -- Name: index_api_clients_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1326 --
1327
1328 CREATE INDEX index_api_clients_on_modified_at ON api_clients USING btree (modified_at);
1329
1330
1331 --
1332 -- Name: index_api_clients_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1333 --
1334
1335 CREATE UNIQUE INDEX index_api_clients_on_uuid ON api_clients USING btree (uuid);
1336
1337
1338 --
1339 -- Name: index_authkeys_on_user_and_expires_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1340 --
1341
1342 CREATE INDEX index_authkeys_on_user_and_expires_at ON authorized_keys USING btree (authorized_user_uuid, expires_at);
1343
1344
1345 --
1346 -- Name: index_authorized_keys_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1347 --
1348
1349 CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON authorized_keys USING btree (uuid);
1350
1351
1352 --
1353 -- Name: index_collections_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1354 --
1355
1356 CREATE INDEX index_collections_on_created_at ON collections USING btree (created_at);
1357
1358
1359 --
1360 -- Name: index_collections_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1361 --
1362
1363 CREATE INDEX index_collections_on_modified_at ON collections USING btree (modified_at);
1364
1365
1366 --
1367 -- Name: index_collections_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1368 --
1369
1370 CREATE UNIQUE INDEX index_collections_on_uuid ON collections USING btree (uuid);
1371
1372
1373 --
1374 -- Name: index_commit_ancestors_on_descendant_and_ancestor; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1375 --
1376
1377 CREATE UNIQUE INDEX index_commit_ancestors_on_descendant_and_ancestor ON commit_ancestors USING btree (descendant, ancestor);
1378
1379
1380 --
1381 -- Name: index_commits_on_repository_name_and_sha1; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1382 --
1383
1384 CREATE UNIQUE INDEX index_commits_on_repository_name_and_sha1 ON commits USING btree (repository_name, sha1);
1385
1386
1387 --
1388 -- Name: index_groups_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1389 --
1390
1391 CREATE INDEX index_groups_on_created_at ON groups USING btree (created_at);
1392
1393
1394 --
1395 -- Name: index_groups_on_group_class; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1396 --
1397
1398 CREATE INDEX index_groups_on_group_class ON groups USING btree (group_class);
1399
1400
1401 --
1402 -- Name: index_groups_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1403 --
1404
1405 CREATE INDEX index_groups_on_modified_at ON groups USING btree (modified_at);
1406
1407
1408 --
1409 -- Name: index_groups_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1410 --
1411
1412 CREATE UNIQUE INDEX index_groups_on_uuid ON groups USING btree (uuid);
1413
1414
1415 --
1416 -- Name: index_humans_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1417 --
1418
1419 CREATE UNIQUE INDEX index_humans_on_uuid ON humans USING btree (uuid);
1420
1421
1422 --
1423 -- Name: index_job_tasks_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1424 --
1425
1426 CREATE INDEX index_job_tasks_on_created_at ON job_tasks USING btree (created_at);
1427
1428
1429 --
1430 -- Name: index_job_tasks_on_job_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1431 --
1432
1433 CREATE INDEX index_job_tasks_on_job_uuid ON job_tasks USING btree (job_uuid);
1434
1435
1436 --
1437 -- Name: index_job_tasks_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1438 --
1439
1440 CREATE INDEX index_job_tasks_on_modified_at ON job_tasks USING btree (modified_at);
1441
1442
1443 --
1444 -- Name: index_job_tasks_on_sequence; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1445 --
1446
1447 CREATE INDEX index_job_tasks_on_sequence ON job_tasks USING btree (sequence);
1448
1449
1450 --
1451 -- Name: index_job_tasks_on_success; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1452 --
1453
1454 CREATE INDEX index_job_tasks_on_success ON job_tasks USING btree (success);
1455
1456
1457 --
1458 -- Name: index_job_tasks_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1459 --
1460
1461 CREATE UNIQUE INDEX index_job_tasks_on_uuid ON job_tasks USING btree (uuid);
1462
1463
1464 --
1465 -- Name: index_jobs_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1466 --
1467
1468 CREATE INDEX index_jobs_on_created_at ON jobs USING btree (created_at);
1469
1470
1471 --
1472 -- Name: index_jobs_on_finished_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1473 --
1474
1475 CREATE INDEX index_jobs_on_finished_at ON jobs USING btree (finished_at);
1476
1477
1478 --
1479 -- Name: index_jobs_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1480 --
1481
1482 CREATE INDEX index_jobs_on_modified_at ON jobs USING btree (modified_at);
1483
1484
1485 --
1486 -- Name: index_jobs_on_output; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1487 --
1488
1489 CREATE INDEX index_jobs_on_output ON jobs USING btree (output);
1490
1491
1492 --
1493 -- Name: index_jobs_on_script; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1494 --
1495
1496 CREATE INDEX index_jobs_on_script ON jobs USING btree (script);
1497
1498
1499 --
1500 -- Name: index_jobs_on_started_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1501 --
1502
1503 CREATE INDEX index_jobs_on_started_at ON jobs USING btree (started_at);
1504
1505
1506 --
1507 -- Name: index_jobs_on_submit_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1508 --
1509
1510 CREATE UNIQUE INDEX index_jobs_on_submit_id ON jobs USING btree (submit_id);
1511
1512
1513 --
1514 -- Name: index_jobs_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1515 --
1516
1517 CREATE UNIQUE INDEX index_jobs_on_uuid ON jobs USING btree (uuid);
1518
1519
1520 --
1521 -- Name: index_keep_disks_on_filesystem_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1522 --
1523
1524 CREATE INDEX index_keep_disks_on_filesystem_uuid ON keep_disks USING btree (filesystem_uuid);
1525
1526
1527 --
1528 -- Name: index_keep_disks_on_last_ping_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1529 --
1530
1531 CREATE INDEX index_keep_disks_on_last_ping_at ON keep_disks USING btree (last_ping_at);
1532
1533
1534 --
1535 -- Name: index_keep_disks_on_node_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1536 --
1537
1538 CREATE INDEX index_keep_disks_on_node_uuid ON keep_disks USING btree (node_uuid);
1539
1540
1541 --
1542 -- Name: index_keep_disks_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1543 --
1544
1545 CREATE UNIQUE INDEX index_keep_disks_on_uuid ON keep_disks USING btree (uuid);
1546
1547
1548 --
1549 -- Name: index_keep_services_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1550 --
1551
1552 CREATE UNIQUE INDEX index_keep_services_on_uuid ON keep_services USING btree (uuid);
1553
1554
1555 --
1556 -- Name: index_links_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1557 --
1558
1559 CREATE INDEX index_links_on_created_at ON links USING btree (created_at);
1560
1561
1562 --
1563 -- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1564 --
1565
1566 CREATE INDEX index_links_on_head_uuid ON links USING btree (head_uuid);
1567
1568
1569 --
1570 -- Name: index_links_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1571 --
1572
1573 CREATE INDEX index_links_on_modified_at ON links USING btree (modified_at);
1574
1575
1576 --
1577 -- Name: index_links_on_tail_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1578 --
1579
1580 CREATE INDEX index_links_on_tail_uuid ON links USING btree (tail_uuid);
1581
1582
1583 --
1584 -- Name: index_links_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1585 --
1586
1587 CREATE UNIQUE INDEX index_links_on_uuid ON links USING btree (uuid);
1588
1589
1590 --
1591 -- Name: index_logs_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1592 --
1593
1594 CREATE INDEX index_logs_on_created_at ON logs USING btree (created_at);
1595
1596
1597 --
1598 -- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1599 --
1600
1601 CREATE INDEX index_logs_on_event_at ON logs USING btree (event_at);
1602
1603
1604 --
1605 -- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1606 --
1607
1608 CREATE INDEX index_logs_on_event_type ON logs USING btree (event_type);
1609
1610
1611 --
1612 -- Name: index_logs_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1613 --
1614
1615 CREATE INDEX index_logs_on_modified_at ON logs USING btree (modified_at);
1616
1617
1618 --
1619 -- Name: index_logs_on_object_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1620 --
1621
1622 CREATE INDEX index_logs_on_object_uuid ON logs USING btree (object_uuid);
1623
1624
1625 --
1626 -- Name: index_logs_on_summary; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1627 --
1628
1629 CREATE INDEX index_logs_on_summary ON logs USING btree (summary);
1630
1631
1632 --
1633 -- Name: index_logs_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1634 --
1635
1636 CREATE UNIQUE INDEX index_logs_on_uuid ON logs USING btree (uuid);
1637
1638
1639 --
1640 -- Name: index_nodes_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1641 --
1642
1643 CREATE INDEX index_nodes_on_created_at ON nodes USING btree (created_at);
1644
1645
1646 --
1647 -- Name: index_nodes_on_hostname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1648 --
1649
1650 CREATE INDEX index_nodes_on_hostname ON nodes USING btree (hostname);
1651
1652
1653 --
1654 -- Name: index_nodes_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1655 --
1656
1657 CREATE INDEX index_nodes_on_modified_at ON nodes USING btree (modified_at);
1658
1659
1660 --
1661 -- Name: index_nodes_on_slot_number; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1662 --
1663
1664 CREATE UNIQUE INDEX index_nodes_on_slot_number ON nodes USING btree (slot_number);
1665
1666
1667 --
1668 -- Name: index_nodes_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1669 --
1670
1671 CREATE UNIQUE INDEX index_nodes_on_uuid ON nodes USING btree (uuid);
1672
1673
1674 --
1675 -- Name: index_pipeline_instances_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1676 --
1677
1678 CREATE INDEX index_pipeline_instances_on_created_at ON pipeline_instances USING btree (created_at);
1679
1680
1681 --
1682 -- Name: index_pipeline_instances_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1683 --
1684
1685 CREATE INDEX index_pipeline_instances_on_modified_at ON pipeline_instances USING btree (modified_at);
1686
1687
1688 --
1689 -- Name: index_pipeline_instances_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1690 --
1691
1692 CREATE UNIQUE INDEX index_pipeline_instances_on_uuid ON pipeline_instances USING btree (uuid);
1693
1694
1695 --
1696 -- Name: index_pipeline_templates_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1697 --
1698
1699 CREATE INDEX index_pipeline_templates_on_created_at ON pipeline_templates USING btree (created_at);
1700
1701
1702 --
1703 -- Name: index_pipeline_templates_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1704 --
1705
1706 CREATE INDEX index_pipeline_templates_on_modified_at ON pipeline_templates USING btree (modified_at);
1707
1708
1709 --
1710 -- Name: index_pipeline_templates_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1711 --
1712
1713 CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON pipeline_templates USING btree (uuid);
1714
1715
1716 --
1717 -- Name: index_repositories_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1718 --
1719
1720 CREATE UNIQUE INDEX index_repositories_on_name ON repositories USING btree (name);
1721
1722
1723 --
1724 -- Name: index_repositories_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1725 --
1726
1727 CREATE UNIQUE INDEX index_repositories_on_uuid ON repositories USING btree (uuid);
1728
1729
1730 --
1731 -- Name: index_specimens_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1732 --
1733
1734 CREATE INDEX index_specimens_on_created_at ON specimens USING btree (created_at);
1735
1736
1737 --
1738 -- Name: index_specimens_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1739 --
1740
1741 CREATE INDEX index_specimens_on_modified_at ON specimens USING btree (modified_at);
1742
1743
1744 --
1745 -- Name: index_specimens_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1746 --
1747
1748 CREATE UNIQUE INDEX index_specimens_on_uuid ON specimens USING btree (uuid);
1749
1750
1751 --
1752 -- Name: index_traits_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1753 --
1754
1755 CREATE INDEX index_traits_on_name ON traits USING btree (name);
1756
1757
1758 --
1759 -- Name: index_traits_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1760 --
1761
1762 CREATE UNIQUE INDEX index_traits_on_uuid ON traits USING btree (uuid);
1763
1764
1765 --
1766 -- Name: index_users_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1767 --
1768
1769 CREATE INDEX index_users_on_created_at ON users USING btree (created_at);
1770
1771
1772 --
1773 -- Name: index_users_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1774 --
1775
1776 CREATE INDEX index_users_on_modified_at ON users USING btree (modified_at);
1777
1778
1779 --
1780 -- Name: index_users_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1781 --
1782
1783 CREATE UNIQUE INDEX index_users_on_uuid ON users USING btree (uuid);
1784
1785
1786 --
1787 -- Name: index_virtual_machines_on_hostname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1788 --
1789
1790 CREATE INDEX index_virtual_machines_on_hostname ON virtual_machines USING btree (hostname);
1791
1792
1793 --
1794 -- Name: index_virtual_machines_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1795 --
1796
1797 CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON virtual_machines USING btree (uuid);
1798
1799
1800 --
1801 -- Name: jobs_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1802 --
1803
1804 CREATE UNIQUE INDEX jobs_owner_uuid_name_unique ON jobs USING btree (owner_uuid, name);
1805
1806
1807 --
1808 -- Name: links_tail_name_unique_if_link_class_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1809 --
1810
1811 CREATE UNIQUE INDEX links_tail_name_unique_if_link_class_name ON links USING btree (tail_uuid, name) WHERE ((link_class)::text = 'name'::text);
1812
1813
1814 --
1815 -- Name: pipeline_instance_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1816 --
1817
1818 CREATE UNIQUE INDEX pipeline_instance_owner_uuid_name_unique ON pipeline_instances USING btree (owner_uuid, name);
1819
1820
1821 --
1822 -- Name: pipeline_template_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1823 --
1824
1825 CREATE UNIQUE INDEX pipeline_template_owner_uuid_name_unique ON pipeline_templates USING btree (owner_uuid, name);
1826
1827
1828 --
1829 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1830 --
1831
1832 CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
1833
1834
1835 --
1836 -- PostgreSQL database dump complete
1837 --
1838
1839 SET search_path TO "$user",public;
1840
1841 INSERT INTO schema_migrations (version) VALUES ('20121016005009');
1842
1843 INSERT INTO schema_migrations (version) VALUES ('20130105203021');
1844
1845 INSERT INTO schema_migrations (version) VALUES ('20130105224358');
1846
1847 INSERT INTO schema_migrations (version) VALUES ('20130105224618');
1848
1849 INSERT INTO schema_migrations (version) VALUES ('20130107181109');
1850
1851 INSERT INTO schema_migrations (version) VALUES ('20130107212832');
1852
1853 INSERT INTO schema_migrations (version) VALUES ('20130109175700');
1854
1855 INSERT INTO schema_migrations (version) VALUES ('20130109220548');
1856
1857 INSERT INTO schema_migrations (version) VALUES ('20130113214204');
1858
1859 INSERT INTO schema_migrations (version) VALUES ('20130116024233');
1860
1861 INSERT INTO schema_migrations (version) VALUES ('20130116215213');
1862
1863 INSERT INTO schema_migrations (version) VALUES ('20130118002239');
1864
1865 INSERT INTO schema_migrations (version) VALUES ('20130122020042');
1866
1867 INSERT INTO schema_migrations (version) VALUES ('20130122201442');
1868
1869 INSERT INTO schema_migrations (version) VALUES ('20130122221616');
1870
1871 INSERT INTO schema_migrations (version) VALUES ('20130123174514');
1872
1873 INSERT INTO schema_migrations (version) VALUES ('20130123180224');
1874
1875 INSERT INTO schema_migrations (version) VALUES ('20130123180228');
1876
1877 INSERT INTO schema_migrations (version) VALUES ('20130125220425');
1878
1879 INSERT INTO schema_migrations (version) VALUES ('20130128202518');
1880
1881 INSERT INTO schema_migrations (version) VALUES ('20130128231343');
1882
1883 INSERT INTO schema_migrations (version) VALUES ('20130130205749');
1884
1885 INSERT INTO schema_migrations (version) VALUES ('20130203104818');
1886
1887 INSERT INTO schema_migrations (version) VALUES ('20130203104824');
1888
1889 INSERT INTO schema_migrations (version) VALUES ('20130203115329');
1890
1891 INSERT INTO schema_migrations (version) VALUES ('20130207195855');
1892
1893 INSERT INTO schema_migrations (version) VALUES ('20130218181504');
1894
1895 INSERT INTO schema_migrations (version) VALUES ('20130226170000');
1896
1897 INSERT INTO schema_migrations (version) VALUES ('20130313175417');
1898
1899 INSERT INTO schema_migrations (version) VALUES ('20130315155820');
1900
1901 INSERT INTO schema_migrations (version) VALUES ('20130315183626');
1902
1903 INSERT INTO schema_migrations (version) VALUES ('20130315213205');
1904
1905 INSERT INTO schema_migrations (version) VALUES ('20130318002138');
1906
1907 INSERT INTO schema_migrations (version) VALUES ('20130319165853');
1908
1909 INSERT INTO schema_migrations (version) VALUES ('20130319180730');
1910
1911 INSERT INTO schema_migrations (version) VALUES ('20130319194637');
1912
1913 INSERT INTO schema_migrations (version) VALUES ('20130319201431');
1914
1915 INSERT INTO schema_migrations (version) VALUES ('20130319235957');
1916
1917 INSERT INTO schema_migrations (version) VALUES ('20130320000107');
1918
1919 INSERT INTO schema_migrations (version) VALUES ('20130326173804');
1920
1921 INSERT INTO schema_migrations (version) VALUES ('20130326182917');
1922
1923 INSERT INTO schema_migrations (version) VALUES ('20130415020241');
1924
1925 INSERT INTO schema_migrations (version) VALUES ('20130425024459');
1926
1927 INSERT INTO schema_migrations (version) VALUES ('20130425214427');
1928
1929 INSERT INTO schema_migrations (version) VALUES ('20130523060112');
1930
1931 INSERT INTO schema_migrations (version) VALUES ('20130523060213');
1932
1933 INSERT INTO schema_migrations (version) VALUES ('20130524042319');
1934
1935 INSERT INTO schema_migrations (version) VALUES ('20130528134100');
1936
1937 INSERT INTO schema_migrations (version) VALUES ('20130606183519');
1938
1939 INSERT INTO schema_migrations (version) VALUES ('20130608053730');
1940
1941 INSERT INTO schema_migrations (version) VALUES ('20130610202538');
1942
1943 INSERT INTO schema_migrations (version) VALUES ('20130611163736');
1944
1945 INSERT INTO schema_migrations (version) VALUES ('20130612042554');
1946
1947 INSERT INTO schema_migrations (version) VALUES ('20130617150007');
1948
1949 INSERT INTO schema_migrations (version) VALUES ('20130626002829');
1950
1951 INSERT INTO schema_migrations (version) VALUES ('20130626022810');
1952
1953 INSERT INTO schema_migrations (version) VALUES ('20130627154537');
1954
1955 INSERT INTO schema_migrations (version) VALUES ('20130627184333');
1956
1957 INSERT INTO schema_migrations (version) VALUES ('20130708163414');
1958
1959 INSERT INTO schema_migrations (version) VALUES ('20130708182912');
1960
1961 INSERT INTO schema_migrations (version) VALUES ('20130708185153');
1962
1963 INSERT INTO schema_migrations (version) VALUES ('20130724153034');
1964
1965 INSERT INTO schema_migrations (version) VALUES ('20131007180607');
1966
1967 INSERT INTO schema_migrations (version) VALUES ('20140117231056');
1968
1969 INSERT INTO schema_migrations (version) VALUES ('20140124222114');
1970
1971 INSERT INTO schema_migrations (version) VALUES ('20140129184311');
1972
1973 INSERT INTO schema_migrations (version) VALUES ('20140317135600');
1974
1975 INSERT INTO schema_migrations (version) VALUES ('20140319160547');
1976
1977 INSERT INTO schema_migrations (version) VALUES ('20140321191343');
1978
1979 INSERT INTO schema_migrations (version) VALUES ('20140324024606');
1980
1981 INSERT INTO schema_migrations (version) VALUES ('20140325175653');
1982
1983 INSERT INTO schema_migrations (version) VALUES ('20140402001908');
1984
1985 INSERT INTO schema_migrations (version) VALUES ('20140407184311');
1986
1987 INSERT INTO schema_migrations (version) VALUES ('20140421140924');
1988
1989 INSERT INTO schema_migrations (version) VALUES ('20140421151939');
1990
1991 INSERT INTO schema_migrations (version) VALUES ('20140421151940');
1992
1993 INSERT INTO schema_migrations (version) VALUES ('20140422011506');
1994
1995 INSERT INTO schema_migrations (version) VALUES ('20140423132913');
1996
1997 INSERT INTO schema_migrations (version) VALUES ('20140423133559');
1998
1999 INSERT INTO schema_migrations (version) VALUES ('20140501165548');
2000
2001 INSERT INTO schema_migrations (version) VALUES ('20140519205916');
2002
2003 INSERT INTO schema_migrations (version) VALUES ('20140527152921');
2004
2005 INSERT INTO schema_migrations (version) VALUES ('20140530200539');
2006
2007 INSERT INTO schema_migrations (version) VALUES ('20140601022548');
2008
2009 INSERT INTO schema_migrations (version) VALUES ('20140602143352');
2010
2011 INSERT INTO schema_migrations (version) VALUES ('20140607150616');
2012
2013 INSERT INTO schema_migrations (version) VALUES ('20140611173003');
2014
2015 INSERT INTO schema_migrations (version) VALUES ('20140627210837');
2016
2017 INSERT INTO schema_migrations (version) VALUES ('20140709172343');
2018
2019 INSERT INTO schema_migrations (version) VALUES ('20140714184006');
2020
2021 INSERT INTO schema_migrations (version) VALUES ('20140811184643');
2022
2023 INSERT INTO schema_migrations (version) VALUES ('20140815171049');
2024
2025 INSERT INTO schema_migrations (version) VALUES ('20140817035914');
2026
2027 INSERT INTO schema_migrations (version) VALUES ('20140818125735');