Bug fix: migration requires CurrentApiClient
[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     expires_at 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     started_at timestamp without time zone,
358     finished_at timestamp without time zone
359 );
360
361
362 --
363 -- Name: job_tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
364 --
365
366 CREATE SEQUENCE job_tasks_id_seq
367     START WITH 1
368     INCREMENT BY 1
369     NO MINVALUE
370     NO MAXVALUE
371     CACHE 1;
372
373
374 --
375 -- Name: job_tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
376 --
377
378 ALTER SEQUENCE job_tasks_id_seq OWNED BY job_tasks.id;
379
380
381 --
382 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE; Schema: public; Owner: -
383 --
384
385 CREATE SEQUENCE job_tasks_qsequence_seq
386     START WITH 1
387     INCREMENT BY 1
388     NO MINVALUE
389     NO MAXVALUE
390     CACHE 1;
391
392
393 --
394 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
395 --
396
397 ALTER SEQUENCE job_tasks_qsequence_seq OWNED BY job_tasks.qsequence;
398
399
400 --
401 -- Name: jobs; Type: TABLE; Schema: public; Owner: -; Tablespace: 
402 --
403
404 CREATE TABLE jobs (
405     id integer NOT NULL,
406     uuid character varying(255),
407     owner_uuid character varying(255),
408     modified_by_client_uuid character varying(255),
409     modified_by_user_uuid character varying(255),
410     modified_at timestamp without time zone,
411     submit_id character varying(255),
412     script character varying(255),
413     script_version character varying(255),
414     script_parameters text,
415     cancelled_by_client_uuid character varying(255),
416     cancelled_by_user_uuid character varying(255),
417     cancelled_at timestamp without time zone,
418     started_at timestamp without time zone,
419     finished_at timestamp without time zone,
420     running boolean,
421     success boolean,
422     output character varying(255),
423     created_at timestamp without time zone NOT NULL,
424     updated_at timestamp without time zone NOT NULL,
425     is_locked_by_uuid character varying(255),
426     log character varying(255),
427     tasks_summary text,
428     runtime_constraints text,
429     nondeterministic boolean,
430     repository character varying(255),
431     supplied_script_version character varying(255),
432     docker_image_locator character varying(255),
433     priority integer DEFAULT 0 NOT NULL,
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     properties text
644 );
645
646
647 --
648 -- Name: nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
649 --
650
651 CREATE SEQUENCE nodes_id_seq
652     START WITH 1
653     INCREMENT BY 1
654     NO MINVALUE
655     NO MAXVALUE
656     CACHE 1;
657
658
659 --
660 -- Name: nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
661 --
662
663 ALTER SEQUENCE nodes_id_seq OWNED BY nodes.id;
664
665
666 --
667 -- Name: pipeline_instances; Type: TABLE; Schema: public; Owner: -; Tablespace: 
668 --
669
670 CREATE TABLE pipeline_instances (
671     id integer NOT NULL,
672     uuid character varying(255),
673     owner_uuid character varying(255),
674     created_at timestamp without time zone NOT NULL,
675     modified_by_client_uuid character varying(255),
676     modified_by_user_uuid character varying(255),
677     modified_at timestamp without time zone,
678     pipeline_template_uuid character varying(255),
679     name character varying(255),
680     components text,
681     updated_at timestamp without time zone NOT NULL,
682     properties text,
683     state character varying(255),
684     components_summary text,
685     started_at timestamp without time zone,
686     finished_at timestamp without time zone,
687     description text
688 );
689
690
691 --
692 -- Name: pipeline_instances_id_seq; Type: SEQUENCE; Schema: public; Owner: -
693 --
694
695 CREATE SEQUENCE pipeline_instances_id_seq
696     START WITH 1
697     INCREMENT BY 1
698     NO MINVALUE
699     NO MAXVALUE
700     CACHE 1;
701
702
703 --
704 -- Name: pipeline_instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
705 --
706
707 ALTER SEQUENCE pipeline_instances_id_seq OWNED BY pipeline_instances.id;
708
709
710 --
711 -- Name: pipeline_templates; Type: TABLE; Schema: public; Owner: -; Tablespace: 
712 --
713
714 CREATE TABLE pipeline_templates (
715     id integer NOT NULL,
716     uuid character varying(255),
717     owner_uuid character varying(255),
718     created_at timestamp without time zone NOT NULL,
719     modified_by_client_uuid character varying(255),
720     modified_by_user_uuid character varying(255),
721     modified_at timestamp without time zone,
722     name character varying(255),
723     components text,
724     updated_at timestamp without time zone NOT NULL,
725     description text
726 );
727
728
729 --
730 -- Name: pipeline_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
731 --
732
733 CREATE SEQUENCE pipeline_templates_id_seq
734     START WITH 1
735     INCREMENT BY 1
736     NO MINVALUE
737     NO MAXVALUE
738     CACHE 1;
739
740
741 --
742 -- Name: pipeline_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
743 --
744
745 ALTER SEQUENCE pipeline_templates_id_seq OWNED BY pipeline_templates.id;
746
747
748 --
749 -- Name: repositories; Type: TABLE; Schema: public; Owner: -; Tablespace: 
750 --
751
752 CREATE TABLE repositories (
753     id integer NOT NULL,
754     uuid character varying(255) NOT NULL,
755     owner_uuid character varying(255) NOT NULL,
756     modified_by_client_uuid character varying(255),
757     modified_by_user_uuid character varying(255),
758     modified_at timestamp without time zone,
759     name character varying(255),
760     fetch_url character varying(255),
761     push_url character varying(255),
762     created_at timestamp without time zone NOT NULL,
763     updated_at timestamp without time zone NOT NULL
764 );
765
766
767 --
768 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
769 --
770
771 CREATE SEQUENCE repositories_id_seq
772     START WITH 1
773     INCREMENT BY 1
774     NO MINVALUE
775     NO MAXVALUE
776     CACHE 1;
777
778
779 --
780 -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
781 --
782
783 ALTER SEQUENCE repositories_id_seq OWNED BY repositories.id;
784
785
786 --
787 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace: 
788 --
789
790 CREATE TABLE schema_migrations (
791     version character varying(255) NOT NULL
792 );
793
794
795 --
796 -- Name: specimens; Type: TABLE; Schema: public; Owner: -; Tablespace: 
797 --
798
799 CREATE TABLE specimens (
800     id integer NOT NULL,
801     uuid character varying(255),
802     owner_uuid character varying(255),
803     created_at timestamp without time zone NOT NULL,
804     modified_by_client_uuid character varying(255),
805     modified_by_user_uuid character varying(255),
806     modified_at timestamp without time zone,
807     material character varying(255),
808     updated_at timestamp without time zone NOT NULL,
809     properties text
810 );
811
812
813 --
814 -- Name: specimens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
815 --
816
817 CREATE SEQUENCE specimens_id_seq
818     START WITH 1
819     INCREMENT BY 1
820     NO MINVALUE
821     NO MAXVALUE
822     CACHE 1;
823
824
825 --
826 -- Name: specimens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
827 --
828
829 ALTER SEQUENCE specimens_id_seq OWNED BY specimens.id;
830
831
832 --
833 -- Name: traits; Type: TABLE; Schema: public; Owner: -; Tablespace: 
834 --
835
836 CREATE TABLE traits (
837     id integer NOT NULL,
838     uuid character varying(255) NOT NULL,
839     owner_uuid character varying(255) NOT NULL,
840     modified_by_client_uuid character varying(255),
841     modified_by_user_uuid character varying(255),
842     modified_at timestamp without time zone,
843     name character varying(255),
844     properties text,
845     created_at timestamp without time zone NOT NULL,
846     updated_at timestamp without time zone NOT NULL
847 );
848
849
850 --
851 -- Name: traits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
852 --
853
854 CREATE SEQUENCE traits_id_seq
855     START WITH 1
856     INCREMENT BY 1
857     NO MINVALUE
858     NO MAXVALUE
859     CACHE 1;
860
861
862 --
863 -- Name: traits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
864 --
865
866 ALTER SEQUENCE traits_id_seq OWNED BY traits.id;
867
868
869 --
870 -- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace: 
871 --
872
873 CREATE TABLE users (
874     id integer NOT NULL,
875     uuid character varying(255),
876     owner_uuid character varying(255) NOT NULL,
877     created_at timestamp without time zone NOT NULL,
878     modified_by_client_uuid character varying(255),
879     modified_by_user_uuid character varying(255),
880     modified_at timestamp without time zone,
881     email character varying(255),
882     first_name character varying(255),
883     last_name character varying(255),
884     identity_url character varying(255),
885     is_admin boolean,
886     prefs text,
887     updated_at timestamp without time zone NOT NULL,
888     default_owner_uuid character varying(255),
889     is_active boolean DEFAULT false
890 );
891
892
893 --
894 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
895 --
896
897 CREATE SEQUENCE users_id_seq
898     START WITH 1
899     INCREMENT BY 1
900     NO MINVALUE
901     NO MAXVALUE
902     CACHE 1;
903
904
905 --
906 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
907 --
908
909 ALTER SEQUENCE users_id_seq OWNED BY users.id;
910
911
912 --
913 -- Name: virtual_machines; Type: TABLE; Schema: public; Owner: -; Tablespace: 
914 --
915
916 CREATE TABLE virtual_machines (
917     id integer NOT NULL,
918     uuid character varying(255) NOT NULL,
919     owner_uuid character varying(255) NOT NULL,
920     modified_by_client_uuid character varying(255),
921     modified_by_user_uuid character varying(255),
922     modified_at timestamp without time zone,
923     hostname character varying(255),
924     created_at timestamp without time zone NOT NULL,
925     updated_at timestamp without time zone NOT NULL
926 );
927
928
929 --
930 -- Name: virtual_machines_id_seq; Type: SEQUENCE; Schema: public; Owner: -
931 --
932
933 CREATE SEQUENCE virtual_machines_id_seq
934     START WITH 1
935     INCREMENT BY 1
936     NO MINVALUE
937     NO MAXVALUE
938     CACHE 1;
939
940
941 --
942 -- Name: virtual_machines_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
943 --
944
945 ALTER SEQUENCE virtual_machines_id_seq OWNED BY virtual_machines.id;
946
947
948 --
949 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
950 --
951
952 ALTER TABLE ONLY api_client_authorizations ALTER COLUMN id SET DEFAULT nextval('api_client_authorizations_id_seq'::regclass);
953
954
955 --
956 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
957 --
958
959 ALTER TABLE ONLY api_clients ALTER COLUMN id SET DEFAULT nextval('api_clients_id_seq'::regclass);
960
961
962 --
963 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
964 --
965
966 ALTER TABLE ONLY authorized_keys ALTER COLUMN id SET DEFAULT nextval('authorized_keys_id_seq'::regclass);
967
968
969 --
970 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
971 --
972
973 ALTER TABLE ONLY collections ALTER COLUMN id SET DEFAULT nextval('collections_id_seq'::regclass);
974
975
976 --
977 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
978 --
979
980 ALTER TABLE ONLY commit_ancestors ALTER COLUMN id SET DEFAULT nextval('commit_ancestors_id_seq'::regclass);
981
982
983 --
984 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
985 --
986
987 ALTER TABLE ONLY commits ALTER COLUMN id SET DEFAULT nextval('commits_id_seq'::regclass);
988
989
990 --
991 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
992 --
993
994 ALTER TABLE ONLY groups ALTER COLUMN id SET DEFAULT nextval('groups_id_seq'::regclass);
995
996
997 --
998 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
999 --
1000
1001 ALTER TABLE ONLY humans ALTER COLUMN id SET DEFAULT nextval('humans_id_seq'::regclass);
1002
1003
1004 --
1005 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1006 --
1007
1008 ALTER TABLE ONLY job_tasks ALTER COLUMN id SET DEFAULT nextval('job_tasks_id_seq'::regclass);
1009
1010
1011 --
1012 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1013 --
1014
1015 ALTER TABLE ONLY jobs ALTER COLUMN id SET DEFAULT nextval('jobs_id_seq'::regclass);
1016
1017
1018 --
1019 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1020 --
1021
1022 ALTER TABLE ONLY keep_disks ALTER COLUMN id SET DEFAULT nextval('keep_disks_id_seq'::regclass);
1023
1024
1025 --
1026 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1027 --
1028
1029 ALTER TABLE ONLY keep_services ALTER COLUMN id SET DEFAULT nextval('keep_services_id_seq'::regclass);
1030
1031
1032 --
1033 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1034 --
1035
1036 ALTER TABLE ONLY links ALTER COLUMN id SET DEFAULT nextval('links_id_seq'::regclass);
1037
1038
1039 --
1040 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1041 --
1042
1043 ALTER TABLE ONLY logs ALTER COLUMN id SET DEFAULT nextval('logs_id_seq'::regclass);
1044
1045
1046 --
1047 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1048 --
1049
1050 ALTER TABLE ONLY nodes ALTER COLUMN id SET DEFAULT nextval('nodes_id_seq'::regclass);
1051
1052
1053 --
1054 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1055 --
1056
1057 ALTER TABLE ONLY pipeline_instances ALTER COLUMN id SET DEFAULT nextval('pipeline_instances_id_seq'::regclass);
1058
1059
1060 --
1061 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1062 --
1063
1064 ALTER TABLE ONLY pipeline_templates ALTER COLUMN id SET DEFAULT nextval('pipeline_templates_id_seq'::regclass);
1065
1066
1067 --
1068 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1069 --
1070
1071 ALTER TABLE ONLY repositories ALTER COLUMN id SET DEFAULT nextval('repositories_id_seq'::regclass);
1072
1073
1074 --
1075 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1076 --
1077
1078 ALTER TABLE ONLY specimens ALTER COLUMN id SET DEFAULT nextval('specimens_id_seq'::regclass);
1079
1080
1081 --
1082 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1083 --
1084
1085 ALTER TABLE ONLY traits ALTER COLUMN id SET DEFAULT nextval('traits_id_seq'::regclass);
1086
1087
1088 --
1089 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1090 --
1091
1092 ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
1093
1094
1095 --
1096 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1097 --
1098
1099 ALTER TABLE ONLY virtual_machines ALTER COLUMN id SET DEFAULT nextval('virtual_machines_id_seq'::regclass);
1100
1101
1102 --
1103 -- Name: api_client_authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1104 --
1105
1106 ALTER TABLE ONLY api_client_authorizations
1107     ADD CONSTRAINT api_client_authorizations_pkey PRIMARY KEY (id);
1108
1109
1110 --
1111 -- Name: api_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1112 --
1113
1114 ALTER TABLE ONLY api_clients
1115     ADD CONSTRAINT api_clients_pkey PRIMARY KEY (id);
1116
1117
1118 --
1119 -- Name: authorized_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1120 --
1121
1122 ALTER TABLE ONLY authorized_keys
1123     ADD CONSTRAINT authorized_keys_pkey PRIMARY KEY (id);
1124
1125
1126 --
1127 -- Name: collections_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1128 --
1129
1130 ALTER TABLE ONLY collections
1131     ADD CONSTRAINT collections_pkey PRIMARY KEY (id);
1132
1133
1134 --
1135 -- Name: commit_ancestors_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1136 --
1137
1138 ALTER TABLE ONLY commit_ancestors
1139     ADD CONSTRAINT commit_ancestors_pkey PRIMARY KEY (id);
1140
1141
1142 --
1143 -- Name: commits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1144 --
1145
1146 ALTER TABLE ONLY commits
1147     ADD CONSTRAINT commits_pkey PRIMARY KEY (id);
1148
1149
1150 --
1151 -- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1152 --
1153
1154 ALTER TABLE ONLY groups
1155     ADD CONSTRAINT groups_pkey PRIMARY KEY (id);
1156
1157
1158 --
1159 -- Name: humans_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1160 --
1161
1162 ALTER TABLE ONLY humans
1163     ADD CONSTRAINT humans_pkey PRIMARY KEY (id);
1164
1165
1166 --
1167 -- Name: job_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1168 --
1169
1170 ALTER TABLE ONLY job_tasks
1171     ADD CONSTRAINT job_tasks_pkey PRIMARY KEY (id);
1172
1173
1174 --
1175 -- Name: jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1176 --
1177
1178 ALTER TABLE ONLY jobs
1179     ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
1180
1181
1182 --
1183 -- Name: keep_disks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1184 --
1185
1186 ALTER TABLE ONLY keep_disks
1187     ADD CONSTRAINT keep_disks_pkey PRIMARY KEY (id);
1188
1189
1190 --
1191 -- Name: keep_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1192 --
1193
1194 ALTER TABLE ONLY keep_services
1195     ADD CONSTRAINT keep_services_pkey PRIMARY KEY (id);
1196
1197
1198 --
1199 -- Name: links_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1200 --
1201
1202 ALTER TABLE ONLY links
1203     ADD CONSTRAINT links_pkey PRIMARY KEY (id);
1204
1205
1206 --
1207 -- Name: logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1208 --
1209
1210 ALTER TABLE ONLY logs
1211     ADD CONSTRAINT logs_pkey PRIMARY KEY (id);
1212
1213
1214 --
1215 -- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1216 --
1217
1218 ALTER TABLE ONLY nodes
1219     ADD CONSTRAINT nodes_pkey PRIMARY KEY (id);
1220
1221
1222 --
1223 -- Name: pipeline_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1224 --
1225
1226 ALTER TABLE ONLY pipeline_instances
1227     ADD CONSTRAINT pipeline_instances_pkey PRIMARY KEY (id);
1228
1229
1230 --
1231 -- Name: pipeline_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1232 --
1233
1234 ALTER TABLE ONLY pipeline_templates
1235     ADD CONSTRAINT pipeline_templates_pkey PRIMARY KEY (id);
1236
1237
1238 --
1239 -- Name: repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1240 --
1241
1242 ALTER TABLE ONLY repositories
1243     ADD CONSTRAINT repositories_pkey PRIMARY KEY (id);
1244
1245
1246 --
1247 -- Name: specimens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1248 --
1249
1250 ALTER TABLE ONLY specimens
1251     ADD CONSTRAINT specimens_pkey PRIMARY KEY (id);
1252
1253
1254 --
1255 -- Name: traits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1256 --
1257
1258 ALTER TABLE ONLY traits
1259     ADD CONSTRAINT traits_pkey PRIMARY KEY (id);
1260
1261
1262 --
1263 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1264 --
1265
1266 ALTER TABLE ONLY users
1267     ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1268
1269
1270 --
1271 -- Name: virtual_machines_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
1272 --
1273
1274 ALTER TABLE ONLY virtual_machines
1275     ADD CONSTRAINT virtual_machines_pkey PRIMARY KEY (id);
1276
1277
1278 --
1279 -- Name: collection_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1280 --
1281
1282 CREATE UNIQUE INDEX collection_owner_uuid_name_unique ON collections USING btree (owner_uuid, name);
1283
1284
1285 --
1286 -- Name: groups_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1287 --
1288
1289 CREATE UNIQUE INDEX groups_owner_uuid_name_unique ON groups USING btree (owner_uuid, name);
1290
1291
1292 --
1293 -- Name: index_api_client_authorizations_on_api_client_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1294 --
1295
1296 CREATE INDEX index_api_client_authorizations_on_api_client_id ON api_client_authorizations USING btree (api_client_id);
1297
1298
1299 --
1300 -- Name: index_api_client_authorizations_on_api_token; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1301 --
1302
1303 CREATE UNIQUE INDEX index_api_client_authorizations_on_api_token ON api_client_authorizations USING btree (api_token);
1304
1305
1306 --
1307 -- Name: index_api_client_authorizations_on_expires_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1308 --
1309
1310 CREATE INDEX index_api_client_authorizations_on_expires_at ON api_client_authorizations USING btree (expires_at);
1311
1312
1313 --
1314 -- Name: index_api_client_authorizations_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1315 --
1316
1317 CREATE INDEX index_api_client_authorizations_on_user_id ON api_client_authorizations USING btree (user_id);
1318
1319
1320 --
1321 -- Name: index_api_clients_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1322 --
1323
1324 CREATE INDEX index_api_clients_on_created_at ON api_clients USING btree (created_at);
1325
1326
1327 --
1328 -- Name: index_api_clients_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1329 --
1330
1331 CREATE INDEX index_api_clients_on_modified_at ON api_clients USING btree (modified_at);
1332
1333
1334 --
1335 -- Name: index_api_clients_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1336 --
1337
1338 CREATE UNIQUE INDEX index_api_clients_on_uuid ON api_clients USING btree (uuid);
1339
1340
1341 --
1342 -- Name: index_authkeys_on_user_and_expires_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1343 --
1344
1345 CREATE INDEX index_authkeys_on_user_and_expires_at ON authorized_keys USING btree (authorized_user_uuid, expires_at);
1346
1347
1348 --
1349 -- Name: index_authorized_keys_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1350 --
1351
1352 CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON authorized_keys USING btree (uuid);
1353
1354
1355 --
1356 -- Name: index_collections_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1357 --
1358
1359 CREATE INDEX index_collections_on_created_at ON collections USING btree (created_at);
1360
1361
1362 --
1363 -- Name: index_collections_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1364 --
1365
1366 CREATE INDEX index_collections_on_modified_at ON collections USING btree (modified_at);
1367
1368
1369 --
1370 -- Name: index_collections_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1371 --
1372
1373 CREATE UNIQUE INDEX index_collections_on_uuid ON collections USING btree (uuid);
1374
1375
1376 --
1377 -- Name: index_commit_ancestors_on_descendant_and_ancestor; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1378 --
1379
1380 CREATE UNIQUE INDEX index_commit_ancestors_on_descendant_and_ancestor ON commit_ancestors USING btree (descendant, ancestor);
1381
1382
1383 --
1384 -- Name: index_commits_on_repository_name_and_sha1; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1385 --
1386
1387 CREATE UNIQUE INDEX index_commits_on_repository_name_and_sha1 ON commits USING btree (repository_name, sha1);
1388
1389
1390 --
1391 -- Name: index_groups_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1392 --
1393
1394 CREATE INDEX index_groups_on_created_at ON groups USING btree (created_at);
1395
1396
1397 --
1398 -- Name: index_groups_on_group_class; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1399 --
1400
1401 CREATE INDEX index_groups_on_group_class ON groups USING btree (group_class);
1402
1403
1404 --
1405 -- Name: index_groups_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1406 --
1407
1408 CREATE INDEX index_groups_on_modified_at ON groups USING btree (modified_at);
1409
1410
1411 --
1412 -- Name: index_groups_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1413 --
1414
1415 CREATE UNIQUE INDEX index_groups_on_uuid ON groups USING btree (uuid);
1416
1417
1418 --
1419 -- Name: index_humans_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1420 --
1421
1422 CREATE UNIQUE INDEX index_humans_on_uuid ON humans USING btree (uuid);
1423
1424
1425 --
1426 -- Name: index_job_tasks_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1427 --
1428
1429 CREATE INDEX index_job_tasks_on_created_at ON job_tasks USING btree (created_at);
1430
1431
1432 --
1433 -- Name: index_job_tasks_on_job_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1434 --
1435
1436 CREATE INDEX index_job_tasks_on_job_uuid ON job_tasks USING btree (job_uuid);
1437
1438
1439 --
1440 -- Name: index_job_tasks_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1441 --
1442
1443 CREATE INDEX index_job_tasks_on_modified_at ON job_tasks USING btree (modified_at);
1444
1445
1446 --
1447 -- Name: index_job_tasks_on_sequence; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1448 --
1449
1450 CREATE INDEX index_job_tasks_on_sequence ON job_tasks USING btree (sequence);
1451
1452
1453 --
1454 -- Name: index_job_tasks_on_success; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1455 --
1456
1457 CREATE INDEX index_job_tasks_on_success ON job_tasks USING btree (success);
1458
1459
1460 --
1461 -- Name: index_job_tasks_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1462 --
1463
1464 CREATE UNIQUE INDEX index_job_tasks_on_uuid ON job_tasks USING btree (uuid);
1465
1466
1467 --
1468 -- Name: index_jobs_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1469 --
1470
1471 CREATE INDEX index_jobs_on_created_at ON jobs USING btree (created_at);
1472
1473
1474 --
1475 -- Name: index_jobs_on_finished_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1476 --
1477
1478 CREATE INDEX index_jobs_on_finished_at ON jobs USING btree (finished_at);
1479
1480
1481 --
1482 -- Name: index_jobs_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1483 --
1484
1485 CREATE INDEX index_jobs_on_modified_at ON jobs USING btree (modified_at);
1486
1487
1488 --
1489 -- Name: index_jobs_on_output; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1490 --
1491
1492 CREATE INDEX index_jobs_on_output ON jobs USING btree (output);
1493
1494
1495 --
1496 -- Name: index_jobs_on_script; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1497 --
1498
1499 CREATE INDEX index_jobs_on_script ON jobs USING btree (script);
1500
1501
1502 --
1503 -- Name: index_jobs_on_started_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1504 --
1505
1506 CREATE INDEX index_jobs_on_started_at ON jobs USING btree (started_at);
1507
1508
1509 --
1510 -- Name: index_jobs_on_submit_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1511 --
1512
1513 CREATE UNIQUE INDEX index_jobs_on_submit_id ON jobs USING btree (submit_id);
1514
1515
1516 --
1517 -- Name: index_jobs_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1518 --
1519
1520 CREATE UNIQUE INDEX index_jobs_on_uuid ON jobs USING btree (uuid);
1521
1522
1523 --
1524 -- Name: index_keep_disks_on_filesystem_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1525 --
1526
1527 CREATE INDEX index_keep_disks_on_filesystem_uuid ON keep_disks USING btree (filesystem_uuid);
1528
1529
1530 --
1531 -- Name: index_keep_disks_on_last_ping_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1532 --
1533
1534 CREATE INDEX index_keep_disks_on_last_ping_at ON keep_disks USING btree (last_ping_at);
1535
1536
1537 --
1538 -- Name: index_keep_disks_on_node_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1539 --
1540
1541 CREATE INDEX index_keep_disks_on_node_uuid ON keep_disks USING btree (node_uuid);
1542
1543
1544 --
1545 -- Name: index_keep_disks_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1546 --
1547
1548 CREATE UNIQUE INDEX index_keep_disks_on_uuid ON keep_disks USING btree (uuid);
1549
1550
1551 --
1552 -- Name: index_keep_services_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1553 --
1554
1555 CREATE UNIQUE INDEX index_keep_services_on_uuid ON keep_services USING btree (uuid);
1556
1557
1558 --
1559 -- Name: index_links_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1560 --
1561
1562 CREATE INDEX index_links_on_created_at ON links USING btree (created_at);
1563
1564
1565 --
1566 -- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1567 --
1568
1569 CREATE INDEX index_links_on_head_uuid ON links USING btree (head_uuid);
1570
1571
1572 --
1573 -- Name: index_links_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1574 --
1575
1576 CREATE INDEX index_links_on_modified_at ON links USING btree (modified_at);
1577
1578
1579 --
1580 -- Name: index_links_on_tail_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1581 --
1582
1583 CREATE INDEX index_links_on_tail_uuid ON links USING btree (tail_uuid);
1584
1585
1586 --
1587 -- Name: index_links_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1588 --
1589
1590 CREATE UNIQUE INDEX index_links_on_uuid ON links USING btree (uuid);
1591
1592
1593 --
1594 -- Name: index_logs_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1595 --
1596
1597 CREATE INDEX index_logs_on_created_at ON logs USING btree (created_at);
1598
1599
1600 --
1601 -- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1602 --
1603
1604 CREATE INDEX index_logs_on_event_at ON logs USING btree (event_at);
1605
1606
1607 --
1608 -- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1609 --
1610
1611 CREATE INDEX index_logs_on_event_type ON logs USING btree (event_type);
1612
1613
1614 --
1615 -- Name: index_logs_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1616 --
1617
1618 CREATE INDEX index_logs_on_modified_at ON logs USING btree (modified_at);
1619
1620
1621 --
1622 -- Name: index_logs_on_object_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1623 --
1624
1625 CREATE INDEX index_logs_on_object_uuid ON logs USING btree (object_uuid);
1626
1627
1628 --
1629 -- Name: index_logs_on_summary; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1630 --
1631
1632 CREATE INDEX index_logs_on_summary ON logs USING btree (summary);
1633
1634
1635 --
1636 -- Name: index_logs_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1637 --
1638
1639 CREATE UNIQUE INDEX index_logs_on_uuid ON logs USING btree (uuid);
1640
1641
1642 --
1643 -- Name: index_nodes_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1644 --
1645
1646 CREATE INDEX index_nodes_on_created_at ON nodes USING btree (created_at);
1647
1648
1649 --
1650 -- Name: index_nodes_on_hostname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1651 --
1652
1653 CREATE INDEX index_nodes_on_hostname ON nodes USING btree (hostname);
1654
1655
1656 --
1657 -- Name: index_nodes_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1658 --
1659
1660 CREATE INDEX index_nodes_on_modified_at ON nodes USING btree (modified_at);
1661
1662
1663 --
1664 -- Name: index_nodes_on_slot_number; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1665 --
1666
1667 CREATE UNIQUE INDEX index_nodes_on_slot_number ON nodes USING btree (slot_number);
1668
1669
1670 --
1671 -- Name: index_nodes_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1672 --
1673
1674 CREATE UNIQUE INDEX index_nodes_on_uuid ON nodes USING btree (uuid);
1675
1676
1677 --
1678 -- Name: index_pipeline_instances_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1679 --
1680
1681 CREATE INDEX index_pipeline_instances_on_created_at ON pipeline_instances USING btree (created_at);
1682
1683
1684 --
1685 -- Name: index_pipeline_instances_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1686 --
1687
1688 CREATE INDEX index_pipeline_instances_on_modified_at ON pipeline_instances USING btree (modified_at);
1689
1690
1691 --
1692 -- Name: index_pipeline_instances_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1693 --
1694
1695 CREATE UNIQUE INDEX index_pipeline_instances_on_uuid ON pipeline_instances USING btree (uuid);
1696
1697
1698 --
1699 -- Name: index_pipeline_templates_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1700 --
1701
1702 CREATE INDEX index_pipeline_templates_on_created_at ON pipeline_templates USING btree (created_at);
1703
1704
1705 --
1706 -- Name: index_pipeline_templates_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1707 --
1708
1709 CREATE INDEX index_pipeline_templates_on_modified_at ON pipeline_templates USING btree (modified_at);
1710
1711
1712 --
1713 -- Name: index_pipeline_templates_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1714 --
1715
1716 CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON pipeline_templates USING btree (uuid);
1717
1718
1719 --
1720 -- Name: index_repositories_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1721 --
1722
1723 CREATE UNIQUE INDEX index_repositories_on_name ON repositories USING btree (name);
1724
1725
1726 --
1727 -- Name: index_repositories_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1728 --
1729
1730 CREATE UNIQUE INDEX index_repositories_on_uuid ON repositories USING btree (uuid);
1731
1732
1733 --
1734 -- Name: index_specimens_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1735 --
1736
1737 CREATE INDEX index_specimens_on_created_at ON specimens USING btree (created_at);
1738
1739
1740 --
1741 -- Name: index_specimens_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1742 --
1743
1744 CREATE INDEX index_specimens_on_modified_at ON specimens USING btree (modified_at);
1745
1746
1747 --
1748 -- Name: index_specimens_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1749 --
1750
1751 CREATE UNIQUE INDEX index_specimens_on_uuid ON specimens USING btree (uuid);
1752
1753
1754 --
1755 -- Name: index_traits_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1756 --
1757
1758 CREATE INDEX index_traits_on_name ON traits USING btree (name);
1759
1760
1761 --
1762 -- Name: index_traits_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1763 --
1764
1765 CREATE UNIQUE INDEX index_traits_on_uuid ON traits USING btree (uuid);
1766
1767
1768 --
1769 -- Name: index_users_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1770 --
1771
1772 CREATE INDEX index_users_on_created_at ON users USING btree (created_at);
1773
1774
1775 --
1776 -- Name: index_users_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1777 --
1778
1779 CREATE INDEX index_users_on_modified_at ON users USING btree (modified_at);
1780
1781
1782 --
1783 -- Name: index_users_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1784 --
1785
1786 CREATE UNIQUE INDEX index_users_on_uuid ON users USING btree (uuid);
1787
1788
1789 --
1790 -- Name: index_virtual_machines_on_hostname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1791 --
1792
1793 CREATE INDEX index_virtual_machines_on_hostname ON virtual_machines USING btree (hostname);
1794
1795
1796 --
1797 -- Name: index_virtual_machines_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1798 --
1799
1800 CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON virtual_machines USING btree (uuid);
1801
1802
1803 --
1804 -- Name: links_tail_name_unique_if_link_class_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1805 --
1806
1807 CREATE UNIQUE INDEX links_tail_name_unique_if_link_class_name ON links USING btree (tail_uuid, name) WHERE ((link_class)::text = 'name'::text);
1808
1809
1810 --
1811 -- Name: pipeline_template_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1812 --
1813
1814 CREATE UNIQUE INDEX pipeline_template_owner_uuid_name_unique ON pipeline_templates USING btree (owner_uuid, name);
1815
1816
1817 --
1818 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: 
1819 --
1820
1821 CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
1822
1823
1824 --
1825 -- PostgreSQL database dump complete
1826 --
1827
1828 SET search_path TO "$user",public;
1829
1830 INSERT INTO schema_migrations (version) VALUES ('20121016005009');
1831
1832 INSERT INTO schema_migrations (version) VALUES ('20130105203021');
1833
1834 INSERT INTO schema_migrations (version) VALUES ('20130105224358');
1835
1836 INSERT INTO schema_migrations (version) VALUES ('20130105224618');
1837
1838 INSERT INTO schema_migrations (version) VALUES ('20130107181109');
1839
1840 INSERT INTO schema_migrations (version) VALUES ('20130107212832');
1841
1842 INSERT INTO schema_migrations (version) VALUES ('20130109175700');
1843
1844 INSERT INTO schema_migrations (version) VALUES ('20130109220548');
1845
1846 INSERT INTO schema_migrations (version) VALUES ('20130113214204');
1847
1848 INSERT INTO schema_migrations (version) VALUES ('20130116024233');
1849
1850 INSERT INTO schema_migrations (version) VALUES ('20130116215213');
1851
1852 INSERT INTO schema_migrations (version) VALUES ('20130118002239');
1853
1854 INSERT INTO schema_migrations (version) VALUES ('20130122020042');
1855
1856 INSERT INTO schema_migrations (version) VALUES ('20130122201442');
1857
1858 INSERT INTO schema_migrations (version) VALUES ('20130122221616');
1859
1860 INSERT INTO schema_migrations (version) VALUES ('20130123174514');
1861
1862 INSERT INTO schema_migrations (version) VALUES ('20130123180224');
1863
1864 INSERT INTO schema_migrations (version) VALUES ('20130123180228');
1865
1866 INSERT INTO schema_migrations (version) VALUES ('20130125220425');
1867
1868 INSERT INTO schema_migrations (version) VALUES ('20130128202518');
1869
1870 INSERT INTO schema_migrations (version) VALUES ('20130128231343');
1871
1872 INSERT INTO schema_migrations (version) VALUES ('20130130205749');
1873
1874 INSERT INTO schema_migrations (version) VALUES ('20130203104818');
1875
1876 INSERT INTO schema_migrations (version) VALUES ('20130203104824');
1877
1878 INSERT INTO schema_migrations (version) VALUES ('20130203115329');
1879
1880 INSERT INTO schema_migrations (version) VALUES ('20130207195855');
1881
1882 INSERT INTO schema_migrations (version) VALUES ('20130218181504');
1883
1884 INSERT INTO schema_migrations (version) VALUES ('20130226170000');
1885
1886 INSERT INTO schema_migrations (version) VALUES ('20130313175417');
1887
1888 INSERT INTO schema_migrations (version) VALUES ('20130315155820');
1889
1890 INSERT INTO schema_migrations (version) VALUES ('20130315183626');
1891
1892 INSERT INTO schema_migrations (version) VALUES ('20130315213205');
1893
1894 INSERT INTO schema_migrations (version) VALUES ('20130318002138');
1895
1896 INSERT INTO schema_migrations (version) VALUES ('20130319165853');
1897
1898 INSERT INTO schema_migrations (version) VALUES ('20130319180730');
1899
1900 INSERT INTO schema_migrations (version) VALUES ('20130319194637');
1901
1902 INSERT INTO schema_migrations (version) VALUES ('20130319201431');
1903
1904 INSERT INTO schema_migrations (version) VALUES ('20130319235957');
1905
1906 INSERT INTO schema_migrations (version) VALUES ('20130320000107');
1907
1908 INSERT INTO schema_migrations (version) VALUES ('20130326173804');
1909
1910 INSERT INTO schema_migrations (version) VALUES ('20130326182917');
1911
1912 INSERT INTO schema_migrations (version) VALUES ('20130415020241');
1913
1914 INSERT INTO schema_migrations (version) VALUES ('20130425024459');
1915
1916 INSERT INTO schema_migrations (version) VALUES ('20130425214427');
1917
1918 INSERT INTO schema_migrations (version) VALUES ('20130523060112');
1919
1920 INSERT INTO schema_migrations (version) VALUES ('20130523060213');
1921
1922 INSERT INTO schema_migrations (version) VALUES ('20130524042319');
1923
1924 INSERT INTO schema_migrations (version) VALUES ('20130528134100');
1925
1926 INSERT INTO schema_migrations (version) VALUES ('20130606183519');
1927
1928 INSERT INTO schema_migrations (version) VALUES ('20130608053730');
1929
1930 INSERT INTO schema_migrations (version) VALUES ('20130610202538');
1931
1932 INSERT INTO schema_migrations (version) VALUES ('20130611163736');
1933
1934 INSERT INTO schema_migrations (version) VALUES ('20130612042554');
1935
1936 INSERT INTO schema_migrations (version) VALUES ('20130617150007');
1937
1938 INSERT INTO schema_migrations (version) VALUES ('20130626002829');
1939
1940 INSERT INTO schema_migrations (version) VALUES ('20130626022810');
1941
1942 INSERT INTO schema_migrations (version) VALUES ('20130627154537');
1943
1944 INSERT INTO schema_migrations (version) VALUES ('20130627184333');
1945
1946 INSERT INTO schema_migrations (version) VALUES ('20130708163414');
1947
1948 INSERT INTO schema_migrations (version) VALUES ('20130708182912');
1949
1950 INSERT INTO schema_migrations (version) VALUES ('20130708185153');
1951
1952 INSERT INTO schema_migrations (version) VALUES ('20130724153034');
1953
1954 INSERT INTO schema_migrations (version) VALUES ('20131007180607');
1955
1956 INSERT INTO schema_migrations (version) VALUES ('20140117231056');
1957
1958 INSERT INTO schema_migrations (version) VALUES ('20140124222114');
1959
1960 INSERT INTO schema_migrations (version) VALUES ('20140129184311');
1961
1962 INSERT INTO schema_migrations (version) VALUES ('20140317135600');
1963
1964 INSERT INTO schema_migrations (version) VALUES ('20140319160547');
1965
1966 INSERT INTO schema_migrations (version) VALUES ('20140321191343');
1967
1968 INSERT INTO schema_migrations (version) VALUES ('20140324024606');
1969
1970 INSERT INTO schema_migrations (version) VALUES ('20140325175653');
1971
1972 INSERT INTO schema_migrations (version) VALUES ('20140402001908');
1973
1974 INSERT INTO schema_migrations (version) VALUES ('20140407184311');
1975
1976 INSERT INTO schema_migrations (version) VALUES ('20140421140924');
1977
1978 INSERT INTO schema_migrations (version) VALUES ('20140421151939');
1979
1980 INSERT INTO schema_migrations (version) VALUES ('20140421151940');
1981
1982 INSERT INTO schema_migrations (version) VALUES ('20140422011506');
1983
1984 INSERT INTO schema_migrations (version) VALUES ('20140423132913');
1985
1986 INSERT INTO schema_migrations (version) VALUES ('20140423133559');
1987
1988 INSERT INTO schema_migrations (version) VALUES ('20140501165548');
1989
1990 INSERT INTO schema_migrations (version) VALUES ('20140519205916');
1991
1992 INSERT INTO schema_migrations (version) VALUES ('20140527152921');
1993
1994 INSERT INTO schema_migrations (version) VALUES ('20140530200539');
1995
1996 INSERT INTO schema_migrations (version) VALUES ('20140601022548');
1997
1998 INSERT INTO schema_migrations (version) VALUES ('20140602143352');
1999
2000 INSERT INTO schema_migrations (version) VALUES ('20140607150616');
2001
2002 INSERT INTO schema_migrations (version) VALUES ('20140611173003');
2003
2004 INSERT INTO schema_migrations (version) VALUES ('20140627210837');
2005
2006 INSERT INTO schema_migrations (version) VALUES ('20140709172343');
2007
2008 INSERT INTO schema_migrations (version) VALUES ('20140714184006');
2009
2010 INSERT INTO schema_migrations (version) VALUES ('20140811184643');
2011
2012 INSERT INTO schema_migrations (version) VALUES ('20140817035914');
2013
2014 INSERT INTO schema_migrations (version) VALUES ('20140818125735');
2015
2016 INSERT INTO schema_migrations (version) VALUES ('20140826180337');
2017
2018 INSERT INTO schema_migrations (version) VALUES ('20140828141043');
2019
2020 INSERT INTO schema_migrations (version) VALUES ('20140909183946');
2021
2022 INSERT INTO schema_migrations (version) VALUES ('20140911221252');
2023
2024 INSERT INTO schema_migrations (version) VALUES ('20140918141529');
2025
2026 INSERT INTO schema_migrations (version) VALUES ('20140918153541');