From daa788815f14e67b8186e4d5e3352089967edd34 Mon Sep 17 00:00:00 2001 From: wish Date: Wed, 3 Aug 2022 17:23:11 +1000 Subject: [PATCH] post-SU9 cleanup --- patch-schema/.gitkeep | 0 patch-schema/aio-upgrade.sql | 11 ------ patch-schema/airouv2.sql | 5 --- patch-schema/dbuserbinaries.sql | 10 ------ patch-schema/distitem.sql | 26 -------------- patch-schema/gook.sql | 26 -------------- patch-schema/guild-additions.sql | 56 ----------------------------- patch-schema/houseinterior.sql | 6 ---- patch-schema/road-shop-rotation.sql | 35 ------------------ patch-schema/scenariocounter.sql | 9 ----- patch-schema/tokensessions.sql | 32 ----------------- 11 files changed, 216 deletions(-) create mode 100644 patch-schema/.gitkeep delete mode 100644 patch-schema/aio-upgrade.sql delete mode 100644 patch-schema/airouv2.sql delete mode 100644 patch-schema/dbuserbinaries.sql delete mode 100644 patch-schema/distitem.sql delete mode 100644 patch-schema/gook.sql delete mode 100644 patch-schema/guild-additions.sql delete mode 100644 patch-schema/houseinterior.sql delete mode 100644 patch-schema/road-shop-rotation.sql delete mode 100644 patch-schema/scenariocounter.sql delete mode 100644 patch-schema/tokensessions.sql diff --git a/patch-schema/.gitkeep b/patch-schema/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/patch-schema/aio-upgrade.sql b/patch-schema/aio-upgrade.sql deleted file mode 100644 index add35cff4..000000000 --- a/patch-schema/aio-upgrade.sql +++ /dev/null @@ -1,11 +0,0 @@ -BEGIN; - -ALTER TABLE IF EXISTS public.users - ALTER rights SET DEFAULT 14; - -ALTER TABLE IF EXISTS public.users - ALTER rights SET NOT NULL; - -UPDATE public.users SET rights=14 WHERE rights IS NULL; - -END; \ No newline at end of file diff --git a/patch-schema/airouv2.sql b/patch-schema/airouv2.sql deleted file mode 100644 index e9573bd43..000000000 --- a/patch-schema/airouv2.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -CREATE SEQUENCE IF NOT EXISTS public.airou_id_seq; - -END; diff --git a/patch-schema/dbuserbinaries.sql b/patch-schema/dbuserbinaries.sql deleted file mode 100644 index 012172073..000000000 --- a/patch-schema/dbuserbinaries.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN; - -CREATE TABLE user_binaries -( - id int PRIMARY KEY, - type2 bytea, - type3 bytea -); - -END; \ No newline at end of file diff --git a/patch-schema/distitem.sql b/patch-schema/distitem.sql deleted file mode 100644 index 7e64e620c..000000000 --- a/patch-schema/distitem.sql +++ /dev/null @@ -1,26 +0,0 @@ -BEGIN; -CREATE TABLE IF NOT EXISTS public.distribution -( - id serial NOT NULL PRIMARY KEY, - character_id int, - type int NOT NULL, - deadline timestamp without time zone, - event_name text NOT NULL DEFAULT 'GM Gift!', - description text NOT NULL DEFAULT '~C05You received a gift!', - times_acceptable int NOT NULL DEFAULT 1, - min_hr int NOT NULL DEFAULT 65535, - max_hr int NOT NULL DEFAULT 65535, - min_sr int NOT NULL DEFAULT 65535, - max_sr int NOT NULL DEFAULT 65535, - min_gr int NOT NULL DEFAULT 65535, - max_gr int NOT NULL DEFAULT 65535, - data bytea NOT NULL -); - -CREATE TABLE IF NOT EXISTS public.distributions_accepted -( - distribution_id int, - character_id int -); - -END; \ No newline at end of file diff --git a/patch-schema/gook.sql b/patch-schema/gook.sql deleted file mode 100644 index 92364862d..000000000 --- a/patch-schema/gook.sql +++ /dev/null @@ -1,26 +0,0 @@ -BEGIN; - -ALTER TABLE IF EXISTS public.gook - DROP COLUMN IF EXISTS gook0status; - -ALTER TABLE IF EXISTS public.gook - DROP COLUMN IF EXISTS gook1status; - -ALTER TABLE IF EXISTS public.gook - DROP COLUMN IF EXISTS gook2status; - -ALTER TABLE IF EXISTS public.gook - DROP COLUMN IF EXISTS gook3status; - -ALTER TABLE IF EXISTS public.gook - DROP COLUMN IF EXISTS gook4status; - -ALTER TABLE IF EXISTS public.gook - DROP COLUMN IF EXISTS gook5status; - -ALTER TABLE IF EXISTS public.gook - DROP COLUMN IF EXISTS gook5; - -UPDATE public.gook SET gook0=NULL, gook1=NULL, gook2=NULL, gook3=NULL, gook4=NULL; - -END; \ No newline at end of file diff --git a/patch-schema/guild-additions.sql b/patch-schema/guild-additions.sql deleted file mode 100644 index 8d98ccf82..000000000 --- a/patch-schema/guild-additions.sql +++ /dev/null @@ -1,56 +0,0 @@ -BEGIN; - -ALTER TABLE IF EXISTS public.guilds - ADD COLUMN IF NOT EXISTS pugi_name_1 varchar(12) DEFAULT ''; -ALTER TABLE IF EXISTS public.guilds - ADD COLUMN IF NOT EXISTS pugi_name_2 varchar(12) DEFAULT ''; -ALTER TABLE IF EXISTS public.guilds - ADD COLUMN IF NOT EXISTS pugi_name_3 varchar(12) DEFAULT ''; - -CREATE TABLE IF NOT EXISTS public.guild_alliances -( - id serial NOT NULL PRIMARY KEY, - name varchar(24) NOT NULL, - created_at timestamp without time zone NOT NULL DEFAULT now(), - parent_id int NOT NULL, - sub1_id int, - sub2_id int -); - -CREATE TABLE IF NOT EXISTS public.guild_adventures -( - id serial NOT NULL PRIMARY KEY, - guild_id int NOT NULL, - destination int NOT NULL, - charge int NOT NULL DEFAULT 0, - depart int NOT NULL, - return int NOT NULL, - collected_by text NOT NULL DEFAULT '' -); - -CREATE TABLE IF NOT EXISTS public.guild_meals -( - id serial NOT NULL PRIMARY KEY, - guild_id int NOT NULL, - meal_id int NOT NULL, - level int NOT NULL, - expires int NOT NULL -); - -CREATE TABLE IF NOT EXISTS public.guild_hunts -( - id serial NOT NULL PRIMARY KEY, - guild_id int NOT NULL, - host_id int NOT NULL, - destination int NOT NULL, - level int NOT NULL, - return int NOT NULL, - acquired bool NOT NULL DEFAULT false, - claimed bool NOT NULL DEFAULT false, - hunters text NOT NULL DEFAULT '', - treasure text NOT NULL DEFAULT '', - hunt_data bytea NOT NULL, - cats_used text NOT NULL -); - -END; \ No newline at end of file diff --git a/patch-schema/houseinterior.sql b/patch-schema/houseinterior.sql deleted file mode 100644 index ad0687ce7..000000000 --- a/patch-schema/houseinterior.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE IF EXISTS public.characters - ADD COLUMN IF NOT EXISTS house bytea; - -END; \ No newline at end of file diff --git a/patch-schema/road-shop-rotation.sql b/patch-schema/road-shop-rotation.sql deleted file mode 100644 index c4c85482c..000000000 --- a/patch-schema/road-shop-rotation.sql +++ /dev/null @@ -1,35 +0,0 @@ -BEGIN; -CREATE TABLE IF NOT EXISTS public.normal_shop_items -( - shoptype integer, - shopid integer, - itemhash integer not null, - itemid integer, - points integer, - tradequantity integer, - rankreqlow integer, - rankreqhigh integer, - rankreqg integer, - storelevelreq integer, - maximumquantity integer, - boughtquantity integer, - roadfloorsrequired integer, - weeklyfataliskills integer, - enable_weeks character varying(8) -); - -ALTER TABLE IF EXISTS public.normal_shop_items - ADD COLUMN IF NOT EXISTS enable_weeks character varying(8); - -CREATE TABLE IF NOT EXISTS public.shop_item_state -( - char_id bigint REFERENCES characters (id), - itemhash int UNIQUE NOT NULL, - usedquantity int, - week int -); - -ALTER TABLE IF EXISTS public.shop_item_state - ADD COLUMN IF NOT EXISTS week int; - -END; \ No newline at end of file diff --git a/patch-schema/scenariocounter.sql b/patch-schema/scenariocounter.sql deleted file mode 100644 index 4b3b99616..000000000 --- a/patch-schema/scenariocounter.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -ALTER TABLE IF EXISTS public.characters - ADD COLUMN IF NOT EXISTS scenariodata bytea; - -ALTER TABLE IF EXISTS public.characters - ADD COLUMN IF NOT EXISTS savefavoritequest bytea; - -END; \ No newline at end of file diff --git a/patch-schema/tokensessions.sql b/patch-schema/tokensessions.sql deleted file mode 100644 index bb6b4a1f1..000000000 --- a/patch-schema/tokensessions.sql +++ /dev/null @@ -1,32 +0,0 @@ -BEGIN; - -DROP TABLE IF EXISTS public.sign_sessions; -CREATE TABLE IF NOT EXISTS public.sign_sessions -( - user_id int NOT NULL, - char_id int, - token varchar(16) NOT NULL, - server_id integer -); - -DROP TABLE IF EXISTS public.servers; -CREATE TABLE IF NOT EXISTS public.servers -( - server_id int NOT NULL, - season int NOT NULL, - current_players int NOT NULL -); - -ALTER TABLE IF EXISTS public.characters - ADD COLUMN IF NOT EXISTS deleted boolean NOT NULL DEFAULT false; - -ALTER TABLE IF EXISTS public.characters - ADD COLUMN IF NOT EXISTS friends text NOT NULL DEFAULT ''; - -ALTER TABLE IF EXISTS public.characters - ADD COLUMN IF NOT EXISTS blocked text NOT NULL DEFAULT ''; - -ALTER TABLE IF EXISTS public.users - ADD COLUMN IF NOT EXISTS last_character int DEFAULT 0; - -END;