1 ALTER TYPE governments RENAME TO govs;
4 \i tables/governments.sql
5 \i data/governments.sql
7 DROP VIEW full_defcalls;
10 DROP VIEW users_defprio;
11 DROP VIEW alliance_resources;
12 DROP VIEW current_planet_stats_full;
13 DROP VIEW current_planet_stats;
15 ALTER COLUMN race TYPE TEXT,
16 ALTER COLUMN gov TYPE TEXT,
17 ALTER COLUMN gov SET DEFAULT '';
18 ALTER TABLE planets ADD FOREIGN KEY (race) REFERENCES races(race) ON UPDATE CASCADE ON DELETE RESTRICT;
19 ALTER TABLE planets ADD FOREIGN KEY (gov) REFERENCES governments(gov) ON UPDATE CASCADE ON DELETE SET DEFAULT;
21 \i views/current_planet_stats.sql
22 \i views/alliances_resources.sql
23 \i views/users_defprio.sql
24 \i views/full_intel.sql
27 DROP FUNCTION IF EXISTS find_planet_id(text,text,text,race);
28 DROP FUNCTION covop_alert(integer, integer, integer, integer, govs, integer);
29 \i functions/find_planet_id.sql
30 \i functions/covop_alert.sql
31 ALTER TABLE ship_stats ADD FOREIGN KEY (race) REFERENCES races(race) ON UPDATE CASCADE ON DELETE CASCADE;
32 ALTER TABLE ship_stats ADD COLUMN cloaked BOOLEAN NOT NULL DEFAULT false, ADD COLUMN baseeta INTEGER NOT NULL DEFAULT 0;
33 ALTER TABLE ship_stats ALTER COLUMN cloaked DROP DEFAULT, ALTER COLUMN baseeta DROP DEFAULT, ALTER COLUMN guns DROP DEFAULT, ALTER COLUMN eres DROP DEFAULT;
39 ALTER TABLE incomings DROP CONSTRAINT incomings_call_key, ADD CONSTRAINT incomings_unique_key UNIQUE (call, pid, fleet, eta);
41 \i functions/hostile_alliances.sql