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