-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
2442 lines (2392 loc) · 40.1 KB
/
schema.sql
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
create table cow_country_codes (
stateabb varchar(3),
ccode int primary key,
statenme varchar(255) unique
);
alter table cow_country_codes
add constraint unique_stateabb
unique (stateabb);
create table cow_war_list (
year int,
war varchar(255),
type varchar,
code int primary key);
create table typology (
war_type_id integer primary key,
war_type varchar
);
insert into typology (war_type_id, war_type) values
(1, 'Inter-state war'),
(2, 'Extra-state war: Colonial--conflict with colony'),
(3, 'Extra-state war: Imperial--state vs. nonstate'),
(4, 'Intra-state war: Civil war--for central control'),
(5, 'Intra-state war: Civil war--over local issues'),
(6, 'Intra-state war: Regional internal'),
(7, 'Intra-state war: Intercommunal'),
(8, 'Non-state war: In nonstate territory'),
(9, 'Non-state war: Across state borders');
create table regions (
where_fought int primary key,
region varchar);
insert into regions values
(1, 'Western Hemisphere'),
(2, 'Europe'),
(4, 'Africa'),
(6, 'Middle East'),
(7, 'Asia'),
(9, 'Oceania');
insert into regions values
(11, 'Europe & Middle East'),
(12, 'Europe & Asia'),
(13, 'Western Hemisphere & Asia'),
(14, 'Europe, Africa & Middle East'),
(15, 'Europe, Africa, Middle East & Asia'),
(16, 'Africa, Middle East, Asia & Oceania'),
(17, 'Asia & Oceania'),
(18, 'Africa & Middle East'),
(19, 'Europe, Africa, Middle East, Asia & Oceania');
alter table regions add constraint unique_region unique (region);
create table alliance_by_member (
version4id int,
ccode int references cow_country_codes(ccode),
state_name varchar,
all_st_day int,
all_st_month int,
all_st_year int,
all_end_day int,
all_end_month int,
all_end_year int,
ss_type varchar,
mem_st_day int,
mem_st_month int,
mem_st_year int,
mem_end_day int,
mem_end_month int,
mem_end_year int,
left_censor boolean,
right_censor boolean,
defense boolean,
neutrality boolean,
nonaggression boolean,
entente boolean,
version double precision,
primary key (version4id, ccode, mem_st_day, mem_st_month, mem_st_year)
);
create table alliance_by_member_yearly (
version4id int,
ccode int references cow_country_codes(ccode),
state_name varchar,
all_st_day int,
all_st_month int,
all_st_year int,
all_end_day int,
all_end_month int,
all_end_year int,
ss_type varchar,
mem_st_day int,
mem_st_month int,
mem_st_year int,
mem_end_day int,
mem_end_month int,
mem_end_year int,
left_censor boolean,
right_censor boolean,
defense boolean,
neutrality boolean,
nonaggression boolean,
entente boolean,
year int,
version double precision,
primary key (version4id, ccode, year));
create table alliance_by_directed (
version4id int,
ccode1 int references cow_country_codes(ccode),
state_name1 varchar,
ccode2 int references cow_country_codes(ccode),
state_name2 varchar,
dyad_st_day int,
dyad_st_month int,
dyad_st_year int,
dyad_end_day int,
dyad_end_month int,
dyad_end_year int,
left_censor boolean,
right_censor boolean,
defense boolean,
neutrality boolean,
nonaggression boolean,
entente boolean,
version double precision,
id int primary key);
create table alliance_by_directed_yearly (
version4id int,
ccode1 int references cow_country_codes (ccode),
state_name1 varchar,
ccode2 int references cow_country_codes (ccode),
state_name2 varchar,
dyad_st_day int,
dyad_st_month int,
dyad_st_year int,
dyad_end_day int,
dyad_end_month int,
dyad_end_year int,
left_censor boolean,
right_censor boolean,
defense boolean,
neutrality boolean,
nonaggression boolean,
entente boolean,
year int,
version double precision,
id int primary key
);
create table alliance_by_dyad (
version4id int,
ccode1 int references cow_country_codes (ccode),
state_name1 varchar,
ccode2 int references cow_country_codes (ccode),
state_name2 varchar,
dyad_st_day int,
dyad_st_month int,
dyad_st_year int,
dyad_end_day int,
dyad_end_month int,
dyad_end_year int,
left_censor boolean,
right_censor boolean,
defense boolean,
neutrality boolean,
nonaggression boolean,
entente boolean,
asymetric boolean,
version double precision,
id int primary key
);
create table alliance_by_dyad_yearly (
version4id int,
ccode1 int references cow_country_codes (ccode),
state_name1 varchar,
ccode2 int references cow_country_codes (ccode),
state_name2 varchar,
dyad_st_day int,
dyad_st_month int,
dyad_st_year int,
dyad_end_day int,
dyad_end_month int,
dyad_end_year int,
left_censor boolean,
right_censor boolean,
defense boolean,
neutrality boolean,
nonaggression boolean,
entente boolean,
year int,
version double precision
);
create table contcol (
dyad int,
statelno int references cow_country_codes (ccode),
statelab varchar(3) references cow_country_codes (stateabb),
dependl int,
conttype int,
statehno int references cow_country_codes (ccode),
statehab varchar(3) references cow_country_codes (stateabb),
dependh int,
begin_year int,
end_year int,
version double precision
);
create table contcold (
dyad int,
statelno int references cow_country_codes (ccode),
statelab varchar(3) references cow_country_codes (stateabb),
statehno int references cow_country_codes (ccode),
statehab varchar(3) references cow_country_codes (stateabb),
year int,
land int,
sea int,
total int,
version double precision
);
create table contcols (
stateno int references cow_country_codes (ccode),
stateab varchar(3) references cow_country_codes (stateabb),
year int,
total int,
land int,
sea int,
version double precision
);
create table contdir (
dyad int,
statelno int references cow_country_codes (ccode),
statelab varchar(3) references cow_country_codes (stateabb),
statehno int references cow_country_codes (ccode),
statehab varchar(3) references cow_country_codes (stateabb),
conttype int,
begin_month int,
end_month int,
notes varchar,
version double precision
);
create table contdird (
dyad int,
state1no int references cow_country_codes (ccode),
state1ab varchar(3) references cow_country_codes (stateabb),
state2no int references cow_country_codes (ccode),
state2ab varchar(3) references cow_country_codes (stateabb),
year int,
conttype int,
version double precision
);
create table contdirs (
stateno int references cow_country_codes (ccode),
stateab varchar(3) references cow_country_codes (stateabb),
year int,
total int,
land int,
sea int,
version double precision
);
create table dcad_main (
ccode1 int references cow_country_codes (ccode),
cowName1 varchar(3),
ccode2 int references cow_country_codes (ccode),
cowName2 varchar(3),
signDay int,
signMonth int,
signYear int,
EIFDay int,
EIFMonth int,
EIFYear int,
type varchar,
category1 varchar,
category2 varchar,
category3 varchar,
span int,
renewType int,
renewYears int,
terminated int,
durationActual int,
endYearEstimate int,
asymmetry int,
categoryConf varchar,
UNTS int,
fullText varchar,
sourceType varchar,
source varchar,
factivaConf int,
factivaSign int,
factivaEIF int,
DCAid varchar);
alter table dcad_main
add primary key (dcaid);
create table dcad_dyadic (
ccode1 int references cow_country_codes (ccode),
abbrev1 varchar(3) references cow_country_codes (stateabb),
ccode2 int references cow_country_codes (ccode),
abbrev2 varchar(3) references cow_country_codes (stateabb),
year int,
dcaGeneralV1 int,
dcaGeneralV2 int,
dcaSectorV1 int,
dcaSectorV2 int,
dcaAnyV1 int,
dcaAnyV2 int);
create table directed_dyadic_war (
warnum int references cow_war_list (code),
disno int,
dyindex varchar,
statea int references cow_country_codes (ccode),
stateb int references cow_country_codes (ccode),
warstrtmnth int,
warstrtday int,
warstrtyr int,
warendmnth int,
warenday int,
warendyr int,
year int,
warolea int,
waroleb int,
wardyadrolea int,
wardyadroleb int,
outcomea int,
batdtha int,
batdthb int,
changes_1 int,
changes_2 int,
batdths int,
durindx int
);
create table dyadic_format_v3 (
ccode1 int references cow_country_codes (ccode),
country1 varchar,
ccode2 int references cow_country_codes (ccode),
country2 varchar,
year int,
state varchar,
AALCO int,
AATA int,
ACDT int,
ACPEU int,
ANZUS int,
AP int,
APT int,
BALTBAT int,
BC int,
BENELUX int,
BSEC int,
CACI int,
CBSS int,
CCNR int,
CComm int,
CENTO int,
CHSTEA int,
CIS int,
COE int,
ComSec int,
EAPC int,
EIPA int,
ESA int,
Entente int,
G15 int,
G24 int,
G3 int,
GLACSEC int,
IADefB int,
IAHC int,
IARHC int,
IASAJ int,
ICAmO int,
ICCILMB int,
ICivDO int,
IDC int,
IOCom int,
IOMig int,
ITTO int,
IUPIP int,
LOAS int,
LoN int,
MFO int,
NAM int,
NATO int,
NCM int,
NordC int,
OAS int,
OAU int,
OCAS int,
OCR int,
OPANAL int,
OSCE int,
PAHO int,
PCA int,
PIF int,
PMAESA int,
RCC int,
RIOgroup int,
RepCom int,
SAARC int,
SCHENGEN int,
SEATO int,
SPC int,
UN int,
USP int,
WCDC int,
WEU int,
WPact int,
Wassen int,
AU int,
CSTO int,
Corg int,
EIP int,
IORARC int,
UM int,
SWPD int,
SCO int,
RECSA int,
BOBP int,
CICA int,
FEC int,
IRU int,
IUIC int,
PAP int,
RCFC int,
SEGIB int,
ACCT int,
ACI int,
ACML int,
ACSO int,
AFTE int,
ARCAL int,
ASATP int,
ASCBC int,
ASEF int,
AmCC int,
AralSea int,
ArticC int,
BCSC int,
BIISEF int,
BIONET int,
CAB int,
CABI int,
CAIPA int,
CAMES int,
CBI int,
CELC int,
CMHASG int,
COLOMBO int,
CONFEJES int,
COSAVE int,
CPAB int,
CPSC int,
CTCAf int,
CWGC int,
CXC int,
Danube int,
ECCD int,
EFCC int,
EFILWC int,
EMBC int,
EMBL int,
EMPPO int,
ESO int,
ETF int,
EUFMD int,
EURATOM int,
GBACT int,
GCRSNC int,
GEF int,
IABE int,
IABath int,
IACI int,
IACS int,
IACSS int,
IACW int,
IAEA int,
IAIAS int,
IAMLO int,
IAPhy int,
IARadiO int,
IARuhr int,
IATSJ int,
IBE int,
IBI int,
IBIER int,
IBPMP int,
ICAO int,
ICCROM int,
ICCS int,
ICDR int,
ICES int,
ICHRB int,
ICMMP int,
ICPRP int,
ICRI int,
ICRPBC int,
ICTM int,
IEC int,
IES int,
IEXB int,
IHO int,
IIE int,
ILO int,
IMBSlav int,
IMC int,
IMI int,
INCAP int,
INFSMK int,
INTERPOL int,
IOEz int,
IOLM int,
IOPH int,
IPedI int,
IPentC int,
IPhyL int,
IRLCS int,
IRO int,
ISA int,
ISHREST int,
ISUPT int,
ITCC int,
ITCLE int,
IUPLAW int,
JALAAO int,
JINR int,
JNOLCRH int,
LACAC int,
LACP int,
LAEO int,
LAIEC int,
LATIN int,
LCBC int,
MCPTTC int,
MCWCASM int,
MWN int,
Montreal int,
NAPPO int,
NASCO int,
NCRR int,
NEAFC int,
NPAFC int,
NPFSC int,
NTSC int,
OCCEDCA int,
OIC int,
OMDKR int,
OSLO int,
OSPAR int,
PAIGH int,
PC int,
PCSP int,
PICES int,
PICS int,
PSNARCO int,
RCAELA int,
RIMMO int,
RIOPPAH int,
SACEP int,
SCAf int,
SCH int,
SEAMEO int,
SWAPU int,
Turksoy int,
UNESCO int,
VASAB int,
WAEC int,
WAHC int,
WHO int,
WMO int,
ALSF int,
AMCOW int,
CBFP int,
CSLF int,
CfRN int,
GEO int,
GHSI int,
IAII int,
ICPTU int,
IGCC int,
INPFC int,
IRENA int,
ISuC int,
WAHO int,
PAPU int,
MAOCN int,
MARRI int,
NPI int,
NWHF int,
AfricaRice int,
BORGIP int,
CILSS int,
EURAMET int,
ICFAM int,
IIFEO int,
IIWEE int,
ISRBC int,
ITRO int,
NAFO int,
NVC int,
OIV int,
PIBAC int,
VALDIVIA int,
UNIDROIT int,
AAAID int,
AACB int,
AARO int,
AATPO int,
ABEDA int,
ABEPSEAC int,
ACC int,
ACP int,
ACS int,
ACSSRB int,
ACU int,
AFESD int,
AFEXIMB int,
AFGEC int,
AFPU int,
AFRAND int,
AGC int,
AGPUNDO int,
AIC int,
AIDC int,
AIDO int,
AIOEC int,
AIPO int,
ALO int,
AMCO int,
AMF int,
AMIPO int,
AMPTU int,
AMSC int,
AMU int,
AOAD int,
AOCRS int,
AOMR int,
AOPU int,
APCC int,
APEC int,
APFIC int,
APIBD int,
APO int,
APPA int,
APTU int,
ARC int,
ARIPO int,
ARPU int,
ASBLAC int,
ASCRubber int,
ASEAN int,
ASECNA int,
ASPAC int,
ATO int,
ATPC int,
AVRDC int,
AfDB int,
AfrOPDA int,
Africare int,
Andean int,
AsDB int,
BIPM int,
BIS int,
BNDP int,
BONN int,
CAAD int,
CAARC int,
CACB int,
CAEC int,
CAECC int,
CAMRSD int,
CAMSF int,
CARICOM int,
CARIFTA int,
CARII int,
CATC int,
CCOM int,
CCPA int,
CDB int,
CEAO int,
CEC int,
CEEPN int,
CEFTA int,
CEI int,
CEMAC int,
CEPGL int,
CERN int,
CFATF int,
CFC int,
CIFC int,
CIMA int,
CMAEC int,
CMAOC int,
CMEA int,
COMESA int,
COPTAC int,
CPU int,
CTO int,
ComAB int,
DBGLS int,
DLCOEA int,
EACM int,
EACSO int,
EADB int,
EAPO int,
EBRD int,
ECB int,
ECCA int,
ECCAS int,
ECCB int,
ECCM int,
ECCPIF int,
ECO int,
ECOWAS int,
ECPTA int,
ECSC int,
EEC int,
EFTA int,
EIB int,
ELDO int,
EMB int,
EMI int,
EPA int,
EPFSC int,
EPO int,
ESRO int,
EU int,
EUROCONTROL int,
EUROFIMA int,
EUROMET int,
FAO int,
FDIPLAC int,
GATT int,
GCC int,
GOIC int,
HCPIL int,
IACB int,
IADB int,
IAFC int,
IAIC int,
IAIGC int,
IALong int,
IARA int,
IAS int,
IATB int,
IATTC int,
IBA int,
IBCS int,
IBEC int,
IBRD int,
ICAC int,
ICAI int,
ICC int,
ICCEC int,
ICCO int,
ICCSLT int,
ICNC int,
ICNWAF int,
ICSE int,
ICSEAF int,
ICSG int,
ICfO int,
IChemO int,
IComO int,
IEA int,
IFAD int,
IFC int,
IFCA int,
IGAD int,
IGC int,
IIA int,
IICom int,
IIF int,
IJO int,
ILZSG int,
IMF int,
IMO int,
IMSO int,
INFOFISH int,
INRO int,
INSG int,
INTELSAT int,
IOATHRE int,
IOOC int,
IOPCF int,
IOcC int,
IPC int,
IPI int,
IPrizeC int,
IRSG int,
ISB int,
ISDB int,
ITC int,
ITPA int,
ITU int,
ITVRC int,
IUPCT int,
IUPNVP int,
IUPR int,
IVWO int,
IWSG int,
IWhale int,
Iocean int,
LAFDO int,
LAFTA int,
LAIA int,
LGIDA int,
MIGA int,
MRU int,
Mercosur int,
NACAP int,
NAFTA int,
NCTR int,
NDF int,
NERC int,
NIB int,
NRC int,
OAPEC int,
OCAM int,
OECD int,
OECS int,
OEEC int,
OPEC int,
OTIF int,
PAHC int,
PCB int,
PED int,
PIARC int,
PIPD int,
PTASEA int,
PUASP int,
RASCOM int,
RadioU int,
SAAFA int,
SACU int,
SADC int,
SADCC int,
SAMI int,
SARTC int,
SCA int,
SELA int,
SICA int,
SIECA int,
SITTDEC int,
SRDO int,
SugU int,
TCRMG int,
UASC int,
UBEC int,
UDEAC int,
UEMOA int,
UIUCV int,
UKDWD int,
UMAC int,
UMOA int,
UNIDO int,
UPU int,
WCO int,
WIPO int,
WNF int,
WTO int,
WTOURO int,
ACWL int,
AFSPC int,
AITIC int,
BS int,
D8 int,
EAC int,
EAEC int,
EPU int,
ERIA int,
AFRISTAT int,
OMVG int);
alter table dyadic_format_v3
add primary key (ccode1, ccode2, year);
create table extra_state_war_data (
war_num int,
war_name varchar,
war_type int,
ccode1 int,
side_a varchar,
ccode2 int,
side_b varchar,
start_month_1 int,
start_day_1 int,
start_year_1 int,
end_month_1 int,
end_day_1 int,
end_year_1 int,
start_month_2 int,
start_day_2 int,
start_year_2 int,
end_month_2 int,
end_day_2 int,
end_year_2 int,
initiator int,
interven int,
trans_from int,
outcome int,
trans_to int,
where_fought int,
bat_death int,
nonstate_deaths int,
version double precision
);
alter table extra_state_war_data
add constraint fk_war_num foreign key (war_num)
references cow_war_list (code);
alter table extra_state_war_data
add constraint fk_ccode1 foreign key (ccode1)
references cow_country_codes (ccode);
alter table extra_state_war_data
add constraint fk_ccode2 foreign key (ccode2)
references cow_country_codes (ccode);
alter table extra_state_war_data
add constraint fk_war_type foreign key (war_type)
references typology (war_type_id);
alter table extra_state_war_data
add constraint fk_where_fought foreign key (where_fought)
references regions (where_fought);
/*CREATE TABLE inter_state_war_data
(
id integer NOT NULL,
WarNum integer NOT NULL references cow_war_list (code),
WarName character varying,
WarType integer references typology (war_type_id),
ccode integer NOT NULL references cow_country_codes (ccode),
StateName character varying,
Side integer,
StartMonth1 integer,
StartDay1 integer,
StartYear1 integer,
EndMonth1 integer,
EndDay1 integer,
EndYear1 integer,
StartMonth2 integer,
StartDay2 integer,
StartYear2 integer,
EndMonth2 integer,
EndDay2 integer,
EndYear2 integer,
TransFrom integer[],
WhereFought integer references regions (where_fought),
Initiator integer,
Outcome integer,
TransTo integer,
BatDeath integer,
Version double precision,
CONSTRAINT inter_state_war_data_pkey PRIMARY KEY (id)
);*/
CREATE TABLE public.inter_state_war_data
(
id integer NOT NULL,
warnum integer NOT NULL,
warname character varying COLLATE pg_catalog."default",
wartype integer,
ccode integer NOT NULL,
statename character varying COLLATE pg_catalog."default",
side integer,
startmonth1 integer,
startday1 integer,
startyear1 integer,
endmonth1 integer,
endday1 integer,
endyear1 integer,
startmonth2 integer,
startday2 integer,
startyear2 integer,
endmonth2 integer,
endday2 integer,
endyear2 integer,
transfrom integer[],
wherefought integer,
initiator integer,
outcome integer,
transto integer,
batdeath integer,
version double precision,
CONSTRAINT inter_state_war_data_pkey PRIMARY KEY (id),
CONSTRAINT inter_state_war_data_ccode_fkey FOREIGN KEY (ccode)
REFERENCES public.cow_country_codes (ccode) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION,
CONSTRAINT inter_state_war_data_warnum_fkey FOREIGN KEY (warnum)
REFERENCES public.cow_war_list (code) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION,
CONSTRAINT inter_state_war_data_wartype_fkey FOREIGN KEY (wartype)
REFERENCES public.typology (war_type_id) MATCH SIMPLE