-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathschema.sql
More file actions
executable file
·1115 lines (774 loc) · 22.9 KB
/
schema.sql
File metadata and controls
executable file
·1115 lines (774 loc) · 22.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: changed_files; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE changed_files (
changedfile_id bigint NOT NULL,
changetype character varying(1024),
commit character varying(1024),
deletions integer,
file_name character varying(1024),
path character varying(1024),
file_type character varying(1024),
full_file_name character varying(1024),
insertions integer,
mode integer,
range_index integer,
range_size integer,
reponame character varying(1024),
snap_id bigint
);
ALTER TABLE changed_files OWNER TO postgres;
--
-- Name: cmd_params; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE cmd_params (
run_id bigint NOT NULL,
cmd_params character varying(1024)
);
ALTER TABLE cmd_params OWNER TO postgres;
--
-- Name: df_add; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_add (
add_id bigint NOT NULL,
current boolean NOT NULL,
destination character varying(1024),
source character varying(1024),
source_destination character varying(1024),
snap_id bigint
);
ALTER TABLE df_add OWNER TO postgres;
--
-- Name: df_arg; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_arg (
arg_id bigint NOT NULL,
arg character varying(255),
current boolean NOT NULL,
snap_id bigint
);
ALTER TABLE df_arg OWNER TO postgres;
--
-- Name: df_cmd; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_cmd (
snap_id bigint NOT NULL,
run_params character varying(1024),
current boolean NOT NULL,
executable character varying(255)
);
ALTER TABLE df_cmd OWNER TO postgres;
--
-- Name: df_comment; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_comment (
comment_id bigint NOT NULL,
comment character varying(1024) NOT NULL,
current boolean NOT NULL,
instruction character varying(1024),
snap_id bigint
);
ALTER TABLE df_comment OWNER TO postgres;
--
-- Name: df_copy; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_copy (
copy_id bigint NOT NULL,
current boolean NOT NULL,
destination character varying(1024),
source character varying(1024),
source_destination character varying(1024),
snap_id bigint
);
ALTER TABLE df_copy OWNER TO postgres;
--
-- Name: df_entrypoint; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_entrypoint (
snap_id bigint NOT NULL,
run_params character varying(1024),
current boolean NOT NULL,
executable character varying(255)
);
ALTER TABLE df_entrypoint OWNER TO postgres;
--
-- Name: df_env; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_env (
env_id bigint NOT NULL,
current boolean NOT NULL,
key character varying(255),
key_value character varying(1024),
value character varying(255),
snap_id bigint
);
ALTER TABLE df_env OWNER TO postgres;
--
-- Name: df_expose; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_expose (
expose_id bigint NOT NULL,
current boolean NOT NULL,
port bigint,
snap_id bigint
);
ALTER TABLE df_expose OWNER TO postgres;
--
-- Name: df_from; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_from (
snap_id bigint NOT NULL,
current boolean NOT NULL,
digest character varying(255),
full_name character varying(255),
imageversionnumber double precision,
imageversionstring character varying(255),
imagename character varying(255) NOT NULL
);
ALTER TABLE df_from OWNER TO postgres;
--
-- Name: df_healthcheck; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_healthcheck (
snap_id bigint NOT NULL,
instruction_params character varying(1024) NOT NULL,
current boolean NOT NULL,
instruction character varying(255) NOT NULL,
options_params character varying(1024) NOT NULL
);
ALTER TABLE df_healthcheck OWNER TO postgres;
--
-- Name: df_label; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_label (
label_id bigint NOT NULL,
current boolean NOT NULL,
key character varying(255),
key_value character varying(1024),
value character varying(255),
snap_id bigint
);
ALTER TABLE df_label OWNER TO postgres;
--
-- Name: df_maintainer; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_maintainer (
snap_id bigint NOT NULL,
current boolean NOT NULL,
maintainername character varying(1024)
);
ALTER TABLE df_maintainer OWNER TO postgres;
--
-- Name: df_onbuild; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_onbuild (
onbuild_id bigint NOT NULL,
instruction_params character varying(1024),
current boolean NOT NULL,
instruction character varying(255) NOT NULL,
snap_id bigint
);
ALTER TABLE df_onbuild OWNER TO postgres;
--
-- Name: df_run; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_run (
run_id bigint NOT NULL,
run_params character varying(2024),
current boolean NOT NULL,
executable character varying(255),
snap_id bigint
);
ALTER TABLE df_run OWNER TO postgres;
--
-- Name: df_stopsignal; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_stopsignal (
snap_id bigint NOT NULL,
current boolean NOT NULL,
signal character varying(255)
);
ALTER TABLE df_stopsignal OWNER TO postgres;
--
-- Name: df_user; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_user (
user_id bigint NOT NULL,
current boolean NOT NULL,
username character varying(255),
snap_id bigint
);
ALTER TABLE df_user OWNER TO postgres;
--
-- Name: df_volume; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_volume (
volume_id bigint NOT NULL,
current boolean NOT NULL,
value character varying(1024),
snap_id bigint
);
ALTER TABLE df_volume OWNER TO postgres;
--
-- Name: df_workdir; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE df_workdir (
workdir_id bigint NOT NULL,
current boolean NOT NULL,
path character varying(1024),
snap_id bigint
);
ALTER TABLE df_workdir OWNER TO postgres;
--
-- Name: diff; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE diff (
diff_id bigint NOT NULL,
commit_date bigint NOT NULL,
del integer NOT NULL,
diff_state character varying(255) NOT NULL,
ins integer NOT NULL,
mod integer NOT NULL
);
ALTER TABLE diff OWNER TO postgres;
--
-- Name: diff_type; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE diff_type (
diff_type_id bigint NOT NULL,
after character varying(255),
before character varying(255),
change_type character varying(255) NOT NULL,
executable character varying(255),
instruction character varying(255),
diff_id bigint
);
ALTER TABLE diff_type OWNER TO postgres;
--
-- Name: dockerfile; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE dockerfile (
dock_id bigint NOT NULL,
commits integer NOT NULL,
docker_path character varying(255) NOT NULL,
created_at bigint NOT NULL,
first_docker_commit bigint NOT NULL,
repo_id bigint NOT NULL,
i_size integer NOT NULL,
project_project_id bigint
);
ALTER TABLE dockerfile OWNER TO postgres;
--
-- Name: entrypoints_params; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE entrypoints_params (
entrypoint_id bigint NOT NULL,
entrypoints_params character varying(1024)
);
ALTER TABLE entrypoints_params OWNER TO postgres;
--
-- Name: project; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE project (
project_id bigint NOT NULL,
git_url character varying(1024) NOT NULL,
created_at bigint NOT NULL,
i_forks integer NOT NULL,
giturl character varying(255),
i_network_count integer NOT NULL,
i_open_issues integer NOT NULL,
i_owner_type character varying(255) NOT NULL,
repo_id bigint NOT NULL,
repo_path character varying(1024) NOT NULL,
i_size integer NOT NULL,
i_stargazers integer NOT NULL,
i_subscribers integer NOT NULL,
i_watchers integer NOT NULL
);
ALTER TABLE project OWNER TO postgres;
--
-- Name: run_params; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE run_params (
run_id bigint NOT NULL,
run_params character varying(2024)
);
ALTER TABLE run_params OWNER TO postgres;
--
-- Name: sec_add; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_add
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_add OWNER TO postgres;
--
-- Name: sec_arg; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_arg
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_arg OWNER TO postgres;
--
-- Name: sec_changedfile; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_changedfile
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_changedfile OWNER TO postgres;
--
-- Name: sec_comment; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_comment
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_comment OWNER TO postgres;
--
-- Name: sec_copy; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_copy
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_copy OWNER TO postgres;
--
-- Name: sec_diff; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_diff
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_diff OWNER TO postgres;
--
-- Name: sec_diff_type; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_diff_type
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_diff_type OWNER TO postgres;
--
-- Name: sec_dock; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_dock
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_dock OWNER TO postgres;
--
-- Name: sec_env; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_env
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_env OWNER TO postgres;
--
-- Name: sec_expose; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_expose
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_expose OWNER TO postgres;
--
-- Name: sec_label; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_label
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_label OWNER TO postgres;
--
-- Name: sec_onbuild; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_onbuild
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_onbuild OWNER TO postgres;
--
-- Name: sec_project; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_project
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_project OWNER TO postgres;
--
-- Name: sec_run; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_run
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_run OWNER TO postgres;
--
-- Name: sec_snap; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_snap
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_snap OWNER TO postgres;
--
-- Name: sec_user; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_user
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_user OWNER TO postgres;
--
-- Name: sec_volume; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_volume
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_volume OWNER TO postgres;
--
-- Name: sec_workdir; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sec_workdir
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sec_workdir OWNER TO postgres;
--
-- Name: snap_diff; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE snap_diff (
snap_id bigint NOT NULL,
diff_id bigint NOT NULL
);
ALTER TABLE snap_diff OWNER TO postgres;
--
-- Name: snapshot; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE snapshot (
snap_id bigint NOT NULL,
change_type character varying(255),
commit_date bigint NOT NULL,
del integer,
from_date bigint NOT NULL,
image_is_automated boolean,
image_is_offical boolean,
commit_index integer NOT NULL,
ins integer,
instructions integer NOT NULL,
current boolean NOT NULL,
repo_id bigint NOT NULL,
star_count integer,
to_date bigint NOT NULL,
dock_id bigint
);
ALTER TABLE snapshot OWNER TO postgres;
--
-- Name: violated_rules; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE violated_rules (
dock_id bigint NOT NULL,
violated_rules character varying(255)
);
ALTER TABLE violated_rules OWNER TO postgres;
--
-- Name: changed_files_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY changed_files
ADD CONSTRAINT changed_files_pkey PRIMARY KEY (changedfile_id);
--
-- Name: df_add_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_add
ADD CONSTRAINT df_add_pkey PRIMARY KEY (add_id);
--
-- Name: df_arg_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_arg
ADD CONSTRAINT df_arg_pkey PRIMARY KEY (arg_id);
--
-- Name: df_cmd_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_cmd
ADD CONSTRAINT df_cmd_pkey PRIMARY KEY (snap_id);
--
-- Name: df_comment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_comment
ADD CONSTRAINT df_comment_pkey PRIMARY KEY (comment_id);
--
-- Name: df_copy_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_copy
ADD CONSTRAINT df_copy_pkey PRIMARY KEY (copy_id);
--
-- Name: df_entrypoint_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_entrypoint
ADD CONSTRAINT df_entrypoint_pkey PRIMARY KEY (snap_id);
--
-- Name: df_env_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_env
ADD CONSTRAINT df_env_pkey PRIMARY KEY (env_id);
--
-- Name: df_expose_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_expose
ADD CONSTRAINT df_expose_pkey PRIMARY KEY (expose_id);
--
-- Name: df_from_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_from
ADD CONSTRAINT df_from_pkey PRIMARY KEY (snap_id);
--
-- Name: df_healthcheck_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_healthcheck
ADD CONSTRAINT df_healthcheck_pkey PRIMARY KEY (snap_id);
--
-- Name: df_label_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_label
ADD CONSTRAINT df_label_pkey PRIMARY KEY (label_id);
--
-- Name: df_maintainer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_maintainer
ADD CONSTRAINT df_maintainer_pkey PRIMARY KEY (snap_id);
--
-- Name: df_onbuild_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_onbuild
ADD CONSTRAINT df_onbuild_pkey PRIMARY KEY (onbuild_id);
--
-- Name: df_run_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_run
ADD CONSTRAINT df_run_pkey PRIMARY KEY (run_id);
--
-- Name: df_stopsignal_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_stopsignal
ADD CONSTRAINT df_stopsignal_pkey PRIMARY KEY (snap_id);
--
-- Name: df_user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_user
ADD CONSTRAINT df_user_pkey PRIMARY KEY (user_id);
--
-- Name: df_volume_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_volume
ADD CONSTRAINT df_volume_pkey PRIMARY KEY (volume_id);
--
-- Name: df_workdir_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_workdir
ADD CONSTRAINT df_workdir_pkey PRIMARY KEY (workdir_id);
--
-- Name: diff_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY diff
ADD CONSTRAINT diff_pkey PRIMARY KEY (diff_id);
--
-- Name: diff_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY diff_type
ADD CONSTRAINT diff_type_pkey PRIMARY KEY (diff_type_id);
--
-- Name: dockerfile_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY dockerfile
ADD CONSTRAINT dockerfile_pkey PRIMARY KEY (dock_id);
--
-- Name: project_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY project
ADD CONSTRAINT project_pkey PRIMARY KEY (project_id);
--
-- Name: snapshot_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY snapshot
ADD CONSTRAINT snapshot_pkey PRIMARY KEY (snap_id);
--
-- Name: fk_99hxtsq8a8nyqbhklapsmr2hk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_env
ADD CONSTRAINT fk_99hxtsq8a8nyqbhklapsmr2hk FOREIGN KEY (snap_id) REFERENCES snapshot(snap_id);
--
-- Name: fk_9x85wmy92i0nxyp8m50j0neo6; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_comment
ADD CONSTRAINT fk_9x85wmy92i0nxyp8m50j0neo6 FOREIGN KEY (snap_id) REFERENCES snapshot(snap_id);
--
-- Name: fk_aixhmxvmk7f2x1oui5f39jqbv; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY dockerfile
ADD CONSTRAINT fk_aixhmxvmk7f2x1oui5f39jqbv FOREIGN KEY (project_project_id) REFERENCES project(project_id);
--
-- Name: fk_c93w807v568ko6rymyt6c305s; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_user
ADD CONSTRAINT fk_c93w807v568ko6rymyt6c305s FOREIGN KEY (snap_id) REFERENCES snapshot(snap_id);
--
-- Name: fk_d3nxo5ilgrrenenxsd7h3x7l; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY changed_files
ADD CONSTRAINT fk_d3nxo5ilgrrenenxsd7h3x7l FOREIGN KEY (snap_id) REFERENCES snapshot(snap_id);
--
-- Name: fk_e1aohuvxylrai5jrd8ioa7yh4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_run
ADD CONSTRAINT fk_e1aohuvxylrai5jrd8ioa7yh4 FOREIGN KEY (snap_id) REFERENCES snapshot(snap_id);
--
-- Name: fk_e68ai4ye6gok22iwxdjeknujn; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY snapshot
ADD CONSTRAINT fk_e68ai4ye6gok22iwxdjeknujn FOREIGN KEY (dock_id) REFERENCES dockerfile(dock_id);
--
-- Name: fk_imwmlbx9q2sohu6bm3nprg0e3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_expose
ADD CONSTRAINT fk_imwmlbx9q2sohu6bm3nprg0e3 FOREIGN KEY (snap_id) REFERENCES snapshot(snap_id);
--
-- Name: fk_imyorafv390dk6vb5cpwn84tw; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY df_copy
ADD CONSTRAINT fk_imyorafv390dk6vb5cpwn84tw FOREIGN KEY (snap_id) REFERENCES snapshot(snap_id);
--
-- Name: fk_iv7p0pca2ic6g7tb968avp8b4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--