-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdowschema.sql
More file actions
1280 lines (756 loc) · 32.2 KB
/
dowschema.sql
File metadata and controls
1280 lines (756 loc) · 32.2 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
CREATE TABLE donors (
donorid serial NOT NULL,
ship character varying(64),
label character varying(64),
captain character varying(64),
email character varying(64),
secreturl character varying(128),
dow_pw character varying(16),
adv_newbie boolean,
adv_done boolean,
adv_high boolean,
adv_hard boolean,
adv_all boolean,
shiploc boolean,
shipconfig boolean,
influence boolean,
admin boolean,
xeno boolean,
wise boolean,
ninjafriend boolean,
pub_adv_newbie boolean,
xenoadmin boolean DEFAULT false,
obfuscate boolean DEFAULT true,
purgers boolean DEFAULT false,
anonymous boolean DEFAULT true,
pub_shop_newbie boolean DEFAULT true,
pub_trade boolean DEFAULT true
);
CREATE TABLE skills (
donorid integer,
turn integer,
area character varying(16),
name character varying(48)
);
CREATE TABLE sysstarnet (
system character varying(32),
terminal integer
);
CREATE TABLE sysplagues (
system character varying(32),
"level" integer,
turn integer
);
CREATE TABLE turnupdate (
turn integer,
donorid integer
);
CREATE TABLE shipdata (
shipdataid serial NOT NULL,
donorid integer,
turn integer,
engskill integer,
sciskill integer,
medskill integer,
weapskill integer,
nengcrew integer,
nscicrew integer,
nmedcrew integer,
nweapcrew integer,
engcrewskill integer,
scicrewskill integer,
medcrewskill integer,
weapcrewskill integer,
impulsepercent integer,
lifesupportpercent integer,
warppercent integer,
sensorpercent integer,
cloakpercent integer,
sickbaypercent integer,
shieldpercent integer,
weaponpercent integer
);
CREATE TABLE adventures (
advid serial NOT NULL,
area character varying(16),
"level" integer,
name character varying(48),
system character varying(16),
turn integer,
sensors integer,
adv_newbie boolean DEFAULT false,
adv_done boolean DEFAULT false,
adv_high boolean DEFAULT false,
adv_hard boolean DEFAULT false,
adv_all boolean DEFAULT false,
locid integer,
pub_adv_newbie boolean DEFAULT false
);
CREATE TABLE terminals (
donorid integer,
system character varying(16),
turn integer
);
CREATE TABLE plagues (
donorid integer,
system character varying(16),
turn integer
);
CREATE TABLE criminals (
who character varying(16),
"level" character varying(16),
"location" character varying(16),
system character varying(16),
turn integer
);
CREATE TABLE enemies (
donorid integer,
who character varying(16),
turn integer
);
CREATE TABLE trade (
tradeid serial NOT NULL,
system character varying(16),
resource character varying(32),
price integer,
turn integer,
donorid integer,
locid integer,
pub_shared boolean DEFAULT false
);
CREATE TABLE meetings (
system character varying(16),
turn integer,
ship1 character varying(64),
ship2 character varying(64),
donated boolean,
protected1 character varying(64),
protected2 character varying(64),
purgers boolean DEFAULT false
);
CREATE TABLE shop (
shopid serial NOT NULL,
system character varying(32),
turn integer,
donorid integer,
item character varying(32),
"type" integer,
tech integer,
yield integer,
reliability integer,
price integer,
sharenewbie boolean DEFAULT false
);
CREATE TABLE rogues (
race character varying(16),
field character varying(16),
"location" character varying(16),
danger integer,
system character varying(16),
turn integer
);
CREATE TABLE stargates (
system1 character varying(16),
system2 character varying(16),
"key" integer
);
CREATE TABLE starcoords (
system character varying(16),
x integer,
y integer,
destnum integer
);
CREATE TABLE pods (
donorid integer,
turn integer,
name character varying(16),
capacity integer,
n integer,
resource character varying(32),
ship character varying(64)
);
CREATE TABLE aliens (
race character varying(16),
alignment character varying(16),
system character varying(16),
area character varying(16),
skilllevel integer
);
CREATE TABLE factories (
resource character varying(32),
system character varying(16),
cost integer
);
CREATE TABLE fragments (
turn integer,
fragment character varying(16),
source character varying(64)
);
CREATE TABLE customsetprefs (
donorid integer,
sn integer,
usn integer,
hw integer,
hwup integer,
hwne integer,
factory integer,
cfactory integer,
erogue integer,
srogue integer,
mrogue integer,
wrogue integer,
jumpcost integer,
resources integer,
hiringhall integer,
eacad integer,
sacad integer,
macad integer,
wacad integer,
eadv integer,
sadv integer,
madv integer,
wadv integer,
euadv integer,
suadv integer,
muadv integer,
wuadv integer,
eschool integer,
sschool integer,
mschool integer,
wschool integer,
prison integer,
ood integer,
hwh integer,
hwc integer,
ocean integer,
epadv integer,
spadv integer,
mpadv integer,
wpadv integer,
useorders boolean
);
CREATE TABLE modules (
moduleid serial NOT NULL,
turn integer,
donorid integer,
item character varying(32),
"type" integer,
tech integer,
yield integer,
reliability integer,
ship character varying(64)
);
CREATE TABLE statics (
system character varying(32),
item character varying(64)
);
CREATE TABLE shiploc (
system character varying(16),
turn integer,
ship character varying(64),
donated boolean,
purgers boolean DEFAULT false
);
CREATE TABLE prefs (
donorid integer,
advdone boolean,
advhard boolean,
advsort character varying(10),
bottombar text,
mapinsys boolean,
leftbar text,
showleftbar boolean,
leftbarwidth integer DEFAULT 150,
prefadvmin integer,
prefadvmax integer,
onlyprefadv boolean
);
CREATE TABLE influence (
ship character varying(64),
system character varying(16),
race character varying(16),
"location" integer,
votes integer,
influence integer,
turn integer,
donated boolean
);
CREATE TABLE shipconfig (
ship character varying(64),
"path" character varying(64),
turn integer,
donated boolean DEFAULT false,
purgers boolean DEFAULT false
);
CREATE TABLE dowaccess (
http_user_agent text,
remote_user character varying(64),
remote_addr character varying(16),
request_uri text,
http_referer text,
dts timestamp without time zone DEFAULT now(),
turn integer
);
CREATE TABLE terrain (
system character varying(16),
terrain character varying(16)
);
CREATE TABLE shipcomments (
commentid serial NOT NULL,
donorid integer,
ship character varying(64),
turn integer,
score integer,
"comment" text,
dts timestamp without time zone DEFAULT now()
);
CREATE TABLE artifacts (
artifactid serial NOT NULL,
donorid integer,
turn integer,
name character varying(16),
bless character(2)
);
CREATE TABLE curses (
artifactid integer,
curse character(2)
);
CREATE TABLE keys (
artifactid integer,
"key" character(1)
);
CREATE TABLE xeno_history (
id serial NOT NULL,
ship character varying(64),
turn integer,
"action" text
);
CREATE TABLE rss (
donorid integer,
contraband boolean,
olympian boolean,
maxjump integer,
nturns integer,
cargoweight character varying(32),
sn integer,
usn integer,
hw integer,
hwup integer,
hwne integer,
hwh integer,
hwc integer,
factory integer,
cfactory integer,
erogue integer,
srogue integer,
mrogue integer,
wrogue integer,
hiringhall integer,
eacad integer,
sacad integer,
macad integer,
wacad integer,
eadv integer,
sadv integer,
madv integer,
wadv integer,
euadv integer,
suadv integer,
muadv integer,
wuadv integer,
eschool integer,
sschool integer,
mschool integer,
wschool integer,
prison integer,
ood integer,
system_bonuses text,
updated boolean,
ocean integer,
excludepods text,
maxpurchase integer,
energypercent double precision
);
CREATE TABLE banned (
ship character varying(64),
turn integer,
"action" character varying(32),
description text
);
CREATE TABLE medicine (
ship character varying(64),
turn integer,
system character varying(16),
value integer
);
CREATE TABLE probes (
donorid integer,
system character varying(32)
);
CREATE TABLE systemviewed (
system character varying(32),
turn integer
);
CREATE TABLE activeships (
turn integer,
ship character varying(64),
id integer
);
CREATE TABLE polls (
pollid serial NOT NULL,
title text,
open boolean,
closedate character varying(32),
note text
);
CREATE TABLE pollitems (
pollitemid serial NOT NULL,
pollid integer,
item text
);
CREATE TABLE pollvotes (
donorid integer,
pollitemid integer,
pollid integer
);
CREATE TABLE colonies (
id integer,
system character varying(16),
race character varying(16),
resource character varying(32)
);
CREATE TABLE badland (
id serial NOT NULL,
danger integer,
system character varying(16)
);
CREATE TABLE corona (
id serial NOT NULL,
danger integer,
system character varying(16)
);
CREATE TABLE traces (
donorid integer,
ship character varying(64),
turn integer
);
CREATE TABLE tracking (
ship character varying(64),
tracked character varying(64)
);
CREATE TABLE allships (
turn integer,
ship character varying(64),
"type" character varying(16)
);
CREATE TABLE favour (
donorid integer,
turn integer,
area character varying(16),
favour integer
);
CREATE TABLE frozen (
ship character varying(64),
turn integer
);
CREATE TABLE rings (
"type" character varying(4),
area character varying(16),
system character varying(16),
turn integer
);
CREATE TABLE popcorn (
system character varying(32),
turn integer,
impulse integer,
sensor integer,
shield integer
);
CREATE TABLE rfat (
ship character varying(64),
contact boolean,
turn integer
);
CREATE TABLE purgedsystems (
purgeid serial NOT NULL,
system character varying(32),
turn integer,
purgers boolean
);
CREATE TABLE purgesuspects (
purgeid integer,
ship character varying(64),
purgers boolean
);
CREATE TABLE newsettings (
donorid integer,
ship character varying(64),
email character varying(64),
secreturl character varying(128),
dow_pw character varying(16),
adv_newbie boolean,
adv_done boolean,
adv_high boolean,
adv_hard boolean,
adv_all boolean,
shiploc boolean,
shipconfig boolean,
influence boolean,
pub_adv_newbie boolean,
obfuscate boolean DEFAULT true,
purgers boolean DEFAULT false,
anonymous boolean DEFAULT true,
pub_shop_newbie boolean DEFAULT true,
pub_trade boolean DEFAULT true
);
CREATE TABLE flags (
ship character varying(64),
flag text,
turn integer
);
CREATE TABLE powerrank (
ship character varying(64),
powerrank integer,
turn integer
);
CREATE TABLE nmods (
moduleid serial NOT NULL,
turn integer NOT NULL,
loctype character(4) NOT NULL,
loc character varying(64) NOT NULL,
name character varying(32) NOT NULL,
broken boolean DEFAULT false NOT NULL,
"type" integer NOT NULL,
tech integer NOT NULL,
yield integer NOT NULL,
reliability integer NOT NULL,
price integer
);
CREATE INDEX trade_index_1 ON trade USING btree (turn);
CREATE UNIQUE INDEX shiplocindex1 ON shiploc USING btree (system, turn, ship);
CREATE INDEX dowaccessindex1 ON dowaccess USING btree (dts);
CREATE INDEX shop_index_1 ON shop USING btree (turn);
CREATE INDEX shop_index_2 ON shop USING btree (tech, "type");
CREATE INDEX shop_index_3 ON shop USING btree (system);
CREATE INDEX artifact_index1 ON artifacts USING btree (artifactid);
CREATE INDEX dowaccess_index2 ON dowaccess USING btree (turn);
CREATE INDEX trade_index_2 ON trade USING btree (system);
CREATE INDEX shiplocindex2 ON shiploc USING btree (ship);
CREATE INDEX shipconfigindex1 ON shipconfig USING btree (ship);
CREATE INDEX influenceindex1 ON influence USING btree (ship);
CREATE INDEX module_index1 ON modules USING btree (turn);
CREATE INDEX pods_index1 ON pods USING btree (turn);
CREATE INDEX artifact_index2 ON artifacts USING btree (turn);
CREATE INDEX shipdata_index1 ON shipdata USING btree (turn);
CREATE INDEX module_index2 ON modules USING btree (ship);
CREATE INDEX nmods_index1 ON nmods USING btree (turn);
CREATE INDEX nmods_index2 ON nmods USING btree (loc);
CREATE INDEX favourindex1 ON favour USING btree (turn);
CREATE INDEX shipconfigindex2 ON shipconfig USING btree (turn);
COMMENT ON DATABASE dow IS 'Overall comments:
The distinction between where to put donor data and where to put other
data was not well thought out. There are many places where I should
have stored ship name rather than donorid, so that if the data is
available for non-donors, there''s somewhere to put it.
When table entries get unique ids and when they do not is also
haphazard.
Although turn information is cached back to turn 1004, I did not
generally reparse historic data when I added new tables.';
COMMENT ON TABLE donors IS 'Information about members of DOW are stored here. Each member has a unique donorid.
The dow_pw is stored plain text. It is also stored encripted in the .htaccess file. See the script dowpw.pl for how the passwords are maintained.
If adv_all is set, so should adv_*
If admin is set, then most scripts will allow you to add the argument -u+ShipName and look at the script as that ship. Very useful for debugging.';
COMMENT ON COLUMN donors.secreturl IS 'Turn page on the tbg server.';
COMMENT ON COLUMN donors.dow_pw IS 'Password in DOW';
COMMENT ON COLUMN donors.adv_newbie IS 'Share adventures of level 1-5';
COMMENT ON COLUMN donors.adv_done IS 'Share adventures that the donor has already completed';
COMMENT ON COLUMN donors.adv_high IS 'Share adventures that are too high level for the donor to do';
COMMENT ON COLUMN donors.adv_hard IS 'Share adventures of level 25+';
COMMENT ON COLUMN donors.adv_all IS 'Share all adventures regardless of other settings';
COMMENT ON COLUMN donors.admin IS 'Administrator. Used for debugging.';
COMMENT ON COLUMN donors.xeno IS 'Member of the Institute of Xenology';
COMMENT ON TABLE skills IS 'Stores the skill levels of each DOW member. IMPORTANT: Only when a new skill is learned does an entry appear. Each area/name combination should therefore only occur once. BUG: Does not take into account evil ring use!';
COMMENT ON COLUMN skills.area IS 'Engineering, Science, Medical, Weaponry';
COMMENT ON COLUMN skills.name IS 'e.g. Moon Adventure 1, Repaired sensor, etc.';
COMMENT ON TABLE sysstarnet IS 'Static list of systems with Starnet terminals.';
COMMENT ON TABLE sysplagues IS 'Reported level of plagues from donors turn pages.';
COMMENT ON TABLE turnupdate IS 'Records which turn each donor has contributed. A common idiom to get the current turn is: select max(turn) from turnupdate;';
COMMENT ON TABLE shipdata IS 'Grab bag of data about donor''s ships. Entries have been added as needed rather than designed.';
COMMENT ON TABLE adventures IS 'Every time an adventure is seen, either from the location report if you''re in system or from the "Known Adventures", it is entered into this table. The donation flags indicate who is allowed to view the adventure. As the player pages are processed, the permisions will become more lenient (e.g. when a player who donates all adventures reports the adventure, all the flags get set to true).';
COMMENT ON COLUMN adventures.area IS 'Engineering, Science, Medical, Weaponry';
COMMENT ON COLUMN adventures.name IS 'E.g. Moon Adventure 2';
COMMENT ON COLUMN adventures.sensors IS 'May be blank if unknown';
COMMENT ON TABLE terminals IS 'Records which terminals a donor has accessed.';
COMMENT ON TABLE plagues IS 'Records which plagues a donor has cured.';
COMMENT ON TABLE criminals IS 'Records where criminals have been seen. Note that just because you know a criminal is in a location, you cannot necessarily pick him up. I believe you personally need to have been the one to gain the information about his location.';
COMMENT ON COLUMN criminals."location" IS 'e.g. homeworld, moon, colony';
COMMENT ON TABLE enemies IS 'Records the alien races that a donor is enemies with.';
COMMENT ON COLUMN enemies.who IS 'e.g. Ant, Bird. Should have been ''race''.';
COMMENT ON TABLE trade IS 'Records trade data from player pages, terminal reports, probe reports, and the Presidential database.
IMPORTANT: Since some systems have colonies that buy two of the same
goods, it is possible to have identical entries (except for the
tradeid). I should have assigned each colony a unique ID, and used
that instead of system/resource.
NOTE: The donorid represents who donated the data. It is no longer
used for anything. It is the donorid if it came from the turn report,
-1 for the presidential database, or donorid+1000 for terminal
reports, etc.
NOTE: I added locid about half-way through DOW''s life.';
COMMENT ON TABLE meetings IS 'Stores ship pairing data. "ship1 (protecting protected1) meets ship2 (protecting protected2)".
Any ship field except ship1 may be null (e.g. if a ship is alone in a system).';
COMMENT ON TABLE shop IS 'Stores shop data. I should have used a unique ID for each shop. Note that I intended to combine this table into TABLE nmods, but I haven''t yet.
Types:
Warp 1, impulse 2, sensor 3, cloak 4, life support 5, sickbay 6,
shield 7, ram 8, gun 9, disruptor 10, laser 11, missile 12, drone 13,
fighter 14, pod 15.
Techs:
Primitive 1, Basic 2, Mediocre 3, Advanced 4, Exotic 5, Magic 6.';
COMMENT ON TABLE rogues IS 'Stores location of rogue bands and associated information. Note that the location is represented by what is needed to protect you from the danger of the location.';
COMMENT ON COLUMN rogues.race IS 'e.g. Worm, Elf';
COMMENT ON COLUMN rogues.field IS 'Engineering, Science, Medical, Weaponry';
COMMENT ON COLUMN rogues."location" IS 'Impulse or Life Support';
COMMENT ON COLUMN rogues.danger IS 'Percentage required';
COMMENT ON TABLE stargates IS 'Stores stargate information. Note that both directions are stored in the table (e.g. Alnitak/Zosca/1 and Zosca/Alnitak/1).';
COMMENT ON TABLE starcoords IS 'Positions of the stars. Note that it is rotated by 90 degrees with respect to how they''re displayed. I wish I could remember where I found these values...';
COMMENT ON TABLE pods IS 'Stores which pods a donor carries. For non-donors, the donorid is null and the ship is set. I really should not have used donorids...';
COMMENT ON COLUMN pods.donorid IS 'NULL if not a donor';
COMMENT ON COLUMN pods.name IS 'e.g. pod-835';
COMMENT ON COLUMN pods.capacity IS 'Size (tech level)';
COMMENT ON COLUMN pods.n IS 'How much cargo currently carried';
COMMENT ON COLUMN pods.resource IS 'Tea, Boardgames, etc';
COMMENT ON COLUMN pods.ship IS 'NULL if a donor. Sigh.';
COMMENT ON TABLE aliens IS 'Stores static info about alien races. Ships are created with skilllevel modules plus or minus 1 min 1 max 6.';
COMMENT ON COLUMN aliens.race IS 'E.g. Ant, Spider';
COMMENT ON COLUMN aliens.alignment IS 'Chaotic, Friendly, Hostile, Neutral';
COMMENT ON COLUMN aliens.system IS 'Homeworld';
COMMENT ON COLUMN aliens.area IS 'Engineering, Medical, Science, Weaponry';
COMMENT ON TABLE factories IS 'Static info on which systems product what resources.';
COMMENT ON TABLE fragments IS 'Stores Starnet password fragments. The source is DOW if obtained from a donor''s turn pages. Other sources are entered by hand, and are typically GIN or TC (for terminal codes). The source is not used by anything currently.';
COMMENT ON COLUMN fragments.source IS 'Not currently used.';
COMMENT ON TABLE customsetprefs IS 'Settings for the Custom Set. Values should have been floats instead of ints.';
COMMENT ON COLUMN customsetprefs.sn IS 'Starnet';
COMMENT ON COLUMN customsetprefs.usn IS 'Unaccessed starnet';
COMMENT ON COLUMN customsetprefs.hw IS 'Homeworld';
COMMENT ON COLUMN customsetprefs.hwup IS 'Homeworld with uncured plague';
COMMENT ON COLUMN customsetprefs.hwne IS 'Homeworld of non-enemy alien';
COMMENT ON COLUMN customsetprefs.cfactory IS 'Contraband factory';
COMMENT ON COLUMN customsetprefs.erogue IS 'Engineering rogue band';
COMMENT ON COLUMN customsetprefs.srogue IS 'Science rogue band';
COMMENT ON COLUMN customsetprefs.mrogue IS 'Medical rogue band';
COMMENT ON COLUMN customsetprefs.wrogue IS 'Weaponry rogue band';
COMMENT ON COLUMN customsetprefs.eacad IS 'Engineering academy';
COMMENT ON COLUMN customsetprefs.sacad IS 'Science academy';
COMMENT ON COLUMN customsetprefs.macad IS 'Medical academy';
COMMENT ON COLUMN customsetprefs.wacad IS 'Weaponry academy';
COMMENT ON COLUMN customsetprefs.eadv IS 'Engineering adventure';
COMMENT ON COLUMN customsetprefs.sadv IS 'Science adventure';
COMMENT ON COLUMN customsetprefs.madv IS 'Medical adventure';
COMMENT ON COLUMN customsetprefs.wadv IS 'Weaponry adventure';
COMMENT ON COLUMN customsetprefs.euadv IS 'Uncomplete engineering adventure';
COMMENT ON COLUMN customsetprefs.suadv IS 'Uncomplete science adventure';
COMMENT ON COLUMN customsetprefs.muadv IS 'Uncomplete medical adventure';
COMMENT ON COLUMN customsetprefs.wuadv IS 'Uncomplete weaponry adventure';
COMMENT ON COLUMN customsetprefs.eschool IS 'Engineering school';
COMMENT ON COLUMN customsetprefs.sschool IS 'Science school';
COMMENT ON COLUMN customsetprefs.mschool IS 'Medical school';
COMMENT ON COLUMN customsetprefs.wschool IS 'Weaponry school';
COMMENT ON COLUMN customsetprefs.ood IS 'Out of date in DOW';
COMMENT ON COLUMN customsetprefs.hwh IS 'Homeworld of hostile alien';
COMMENT ON COLUMN customsetprefs.hwc IS 'Homeworld of chaotic alien';
COMMENT ON COLUMN customsetprefs.epadv IS 'Engineering preferred adventure';
COMMENT ON COLUMN customsetprefs.spadv IS 'Science preferred adventure';
COMMENT ON COLUMN customsetprefs.mpadv IS 'Medical preferred adventure';
COMMENT ON COLUMN customsetprefs.wpadv IS 'Weaponry preferred adventure';