From 75bd425fbf424acd93c88ce7b6b82afae35f0e17 Mon Sep 17 00:00:00 2001 From: wish Date: Mon, 24 Oct 2022 18:33:55 +1100 Subject: [PATCH] remove migrations directory --- migrations/000001_initial_db.down.sql | 10 -- migrations/000001_initial_db.up.sql | 37 ------- migrations/000002_alter_characters.down.sql | 8 -- migrations/000002_alter_characters.up.sql | 8 -- migrations/000003_character_savedata.down.sql | 6 -- migrations/000003_character_savedata.up.sql | 6 -- .../000004_character_additional.down.sql | 13 --- migrations/000004_character_additional.up.sql | 14 --- migrations/000005_quests.down.sql | 5 - migrations/000005_quests.up.sql | 8 -- migrations/000006_mercenary.down.sql | 6 -- migrations/000006_mercenary.up.sql | 6 -- migrations/000007_guilds.down.sql | 6 -- migrations/000007_guilds.up.sql | 22 ---- migrations/000008_guild_additional.down.sql | 11 -- migrations/000008_guild_additional.up.sql | 11 -- migrations/000009_character_social.down.sql | 6 -- migrations/000009_character_social.up.sql | 6 -- ...0010_guild_comments_festival_hall.down.sql | 10 -- ...000010_guild_comments_festival_hall.up.sql | 11 -- .../000011_character_points_minidata.down.sql | 24 ----- .../000011_character_points_minidata.up.sql | 100 ------------------ migrations/000012_loginboost_etc.down.sql | 5 - migrations/000012_loginboost_etc.up.sql | 13 --- migrations/000013_shop_constraints.down.sql | 12 --- migrations/000013_shop_constraints.up.sql | 12 --- .../000014_guild_flags_applications.down.sql | 18 ---- .../000014_guild_flags_applications.up.sql | 30 ------ migrations/000015_mail.down.sql | 3 - migrations/000015_mail.up.sql | 19 ---- migrations/000016_server.down.sql | 3 - migrations/000016_server.up.sql | 21 ---- migrations/000017_account.down.sql | 6 -- migrations/000017_account.up.sql | 45 -------- migrations/000018_event_week.down.sql | 3 - migrations/000018_event_week.up.sql | 11 -- migrations/000019_gook.down.sql | 3 - migrations/000019_gook.up.sql | 20 ---- migrations/000020_history.down.sql | 3 - migrations/000020_history.up.sql | 13 --- 40 files changed, 574 deletions(-) delete mode 100644 migrations/000001_initial_db.down.sql delete mode 100644 migrations/000001_initial_db.up.sql delete mode 100644 migrations/000002_alter_characters.down.sql delete mode 100644 migrations/000002_alter_characters.up.sql delete mode 100644 migrations/000003_character_savedata.down.sql delete mode 100644 migrations/000003_character_savedata.up.sql delete mode 100644 migrations/000004_character_additional.down.sql delete mode 100644 migrations/000004_character_additional.up.sql delete mode 100644 migrations/000005_quests.down.sql delete mode 100644 migrations/000005_quests.up.sql delete mode 100644 migrations/000006_mercenary.down.sql delete mode 100644 migrations/000006_mercenary.up.sql delete mode 100644 migrations/000007_guilds.down.sql delete mode 100644 migrations/000007_guilds.up.sql delete mode 100644 migrations/000008_guild_additional.down.sql delete mode 100644 migrations/000008_guild_additional.up.sql delete mode 100644 migrations/000009_character_social.down.sql delete mode 100644 migrations/000009_character_social.up.sql delete mode 100644 migrations/000010_guild_comments_festival_hall.down.sql delete mode 100644 migrations/000010_guild_comments_festival_hall.up.sql delete mode 100644 migrations/000011_character_points_minidata.down.sql delete mode 100644 migrations/000011_character_points_minidata.up.sql delete mode 100644 migrations/000012_loginboost_etc.down.sql delete mode 100644 migrations/000012_loginboost_etc.up.sql delete mode 100644 migrations/000013_shop_constraints.down.sql delete mode 100644 migrations/000013_shop_constraints.up.sql delete mode 100644 migrations/000014_guild_flags_applications.down.sql delete mode 100644 migrations/000014_guild_flags_applications.up.sql delete mode 100644 migrations/000015_mail.down.sql delete mode 100644 migrations/000015_mail.up.sql delete mode 100644 migrations/000016_server.down.sql delete mode 100644 migrations/000016_server.up.sql delete mode 100644 migrations/000017_account.down.sql delete mode 100644 migrations/000017_account.up.sql delete mode 100644 migrations/000018_event_week.down.sql delete mode 100644 migrations/000018_event_week.up.sql delete mode 100644 migrations/000019_gook.down.sql delete mode 100644 migrations/000019_gook.up.sql delete mode 100644 migrations/000020_history.down.sql delete mode 100644 migrations/000020_history.up.sql diff --git a/migrations/000001_initial_db.down.sql b/migrations/000001_initial_db.down.sql deleted file mode 100644 index 04f7e46f8..000000000 --- a/migrations/000001_initial_db.down.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN; - -DROP TABLE IF EXISTS sign_sessions; -DROP TABLE IF EXISTS characters; -DROP TABLE IF EXISTS users; - -DROP DOMAIN IF EXISTS uint8; -DROP DOMAIN IF EXISTS uint16; - -END; \ No newline at end of file diff --git a/migrations/000001_initial_db.up.sql b/migrations/000001_initial_db.up.sql deleted file mode 100644 index eeac64a33..000000000 --- a/migrations/000001_initial_db.up.sql +++ /dev/null @@ -1,37 +0,0 @@ -BEGIN; - -CREATE DOMAIN uint8 AS smallint - CHECK(VALUE >= 0 AND VALUE <= 255); - -CREATE DOMAIN uint16 AS integer - CHECK(VALUE >= 0 AND VALUE <= 65536); - -CREATE TABLE users ( - id serial NOT NULL PRIMARY KEY, - username text UNIQUE NOT NULL, - password text NOT NULL, - item_box bytea -); - -CREATE TABLE characters ( - id serial NOT NULL PRIMARY KEY, - user_id bigint REFERENCES users(id), - is_female boolean, - is_new_character boolean, - small_gr_level uint8, - gr_override_mode boolean, - name varchar(15), - unk_desc_string varchar(31), - gr_override_level uint16, - gr_override_unk0 uint8, - gr_override_unk1 uint8 -); - -CREATE TABLE sign_sessions ( - id serial NOT NULL PRIMARY KEY, - user_id bigint REFERENCES users(id), - auth_token_num bigint, - auth_token_str text -); - -END; \ No newline at end of file diff --git a/migrations/000002_alter_characters.down.sql b/migrations/000002_alter_characters.down.sql deleted file mode 100644 index c5eeb425b..000000000 --- a/migrations/000002_alter_characters.down.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; - -ALTER TABLE characters - DROP COLUMN exp, - DROP COLUMN weapon, - DROP COLUMN last_login; - -END; \ No newline at end of file diff --git a/migrations/000002_alter_characters.up.sql b/migrations/000002_alter_characters.up.sql deleted file mode 100644 index 8e92154dc..000000000 --- a/migrations/000002_alter_characters.up.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; - -ALTER TABLE characters - ADD COLUMN exp uint16, - ADD COLUMN weapon uint16, - ADD COLUMN last_login integer; - -END; \ No newline at end of file diff --git a/migrations/000003_character_savedata.down.sql b/migrations/000003_character_savedata.down.sql deleted file mode 100644 index d8d1ca8c6..000000000 --- a/migrations/000003_character_savedata.down.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE characters - DROP COLUMN savedata; - -END; \ No newline at end of file diff --git a/migrations/000003_character_savedata.up.sql b/migrations/000003_character_savedata.up.sql deleted file mode 100644 index d0f39a223..000000000 --- a/migrations/000003_character_savedata.up.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE characters - ADD COLUMN savedata bytea; - -END; \ No newline at end of file diff --git a/migrations/000004_character_additional.down.sql b/migrations/000004_character_additional.down.sql deleted file mode 100644 index 5229381cb..000000000 --- a/migrations/000004_character_additional.down.sql +++ /dev/null @@ -1,13 +0,0 @@ -BEGIN; - -ALTER TABLE characters - DROP COLUMN decomyset, - DROP COLUMN hunternavi, - DROP COLUMN otomoairou, - DROP COLUMN partner, - DROP COLUMN platebox, - DROP COLUMN platedata, - DROP COLUMN platemyset, - DROP COLUMN rengokudata; - -END; \ No newline at end of file diff --git a/migrations/000004_character_additional.up.sql b/migrations/000004_character_additional.up.sql deleted file mode 100644 index 699351796..000000000 --- a/migrations/000004_character_additional.up.sql +++ /dev/null @@ -1,14 +0,0 @@ -BEGIN; - -ALTER TABLE characters - ADD COLUMN decomyset bytea, - ADD COLUMN hunternavi bytea, - ADD COLUMN otomoairou bytea, - ADD COLUMN partner bytea, - ADD COLUMN platebox bytea, - ADD COLUMN platedata bytea, - ADD COLUMN platemyset bytea, - ADD COLUMN trophy bytea, - ADD COLUMN rengokudata bytea; - -END; diff --git a/migrations/000005_quests.down.sql b/migrations/000005_quests.down.sql deleted file mode 100644 index 60eff8f22..000000000 --- a/migrations/000005_quests.down.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -DROP TABLE IF EXISTS questlists; - -END; \ No newline at end of file diff --git a/migrations/000005_quests.up.sql b/migrations/000005_quests.up.sql deleted file mode 100644 index 26a02f8d1..000000000 --- a/migrations/000005_quests.up.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; - -CREATE TABLE questlists ( - ind int NOT NULL PRIMARY KEY, - questlist bytea -); - -END; \ No newline at end of file diff --git a/migrations/000006_mercenary.down.sql b/migrations/000006_mercenary.down.sql deleted file mode 100644 index 54cbd957b..000000000 --- a/migrations/000006_mercenary.down.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE characters - DROP COLUMN savemercenary; - -END; \ No newline at end of file diff --git a/migrations/000006_mercenary.up.sql b/migrations/000006_mercenary.up.sql deleted file mode 100644 index af025dff0..000000000 --- a/migrations/000006_mercenary.up.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE characters - ADD COLUMN savemercenary bytea; - -END; \ No newline at end of file diff --git a/migrations/000007_guilds.down.sql b/migrations/000007_guilds.down.sql deleted file mode 100644 index 344ab854e..000000000 --- a/migrations/000007_guilds.down.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -DROP TABLE guild_characters; -DROP TABLE guilds; - -END; \ No newline at end of file diff --git a/migrations/000007_guilds.up.sql b/migrations/000007_guilds.up.sql deleted file mode 100644 index e327c7db3..000000000 --- a/migrations/000007_guilds.up.sql +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN; - -CREATE TABLE guilds -( - id serial NOT NULL PRIMARY KEY, - name varchar(24), - created_at timestamp DEFAULT NOW(), - leader_id int NOT NULL, - main_motto varchar(255) DEFAULT '' -); - -CREATE TABLE guild_characters -( - id serial NOT NULL PRIMARY KEY, - guild_id bigint REFERENCES guilds (id), - character_id bigint REFERENCES characters (id), - joined_at timestamp DEFAULT NOW() -); - -CREATE UNIQUE INDEX guild_character_unique_index ON guild_characters (character_id); - -END; \ No newline at end of file diff --git a/migrations/000008_guild_additional.down.sql b/migrations/000008_guild_additional.down.sql deleted file mode 100644 index 9252a98f2..000000000 --- a/migrations/000008_guild_additional.down.sql +++ /dev/null @@ -1,11 +0,0 @@ -BEGIN; - -ALTER TABLE guilds - DROP COLUMN rp; - -ALTER TABLE guild_characters - DROP COLUMN is_applicant, - DROP COLUMN is_sub_leader, - DROP COLUMN order_index; - -END; \ No newline at end of file diff --git a/migrations/000008_guild_additional.up.sql b/migrations/000008_guild_additional.up.sql deleted file mode 100644 index 7e16984d3..000000000 --- a/migrations/000008_guild_additional.up.sql +++ /dev/null @@ -1,11 +0,0 @@ -BEGIN; - -ALTER TABLE guild_characters - ADD COLUMN is_applicant bool NOT NULL DEFAULT false, - ADD COLUMN is_sub_leader bool NOT NULL DEFAULT false, - ADD COLUMN order_index int NOT NULL DEFAULT 1; - -ALTER TABLE guilds - ADD COLUMN rp uint16 NOT NULL DEFAULT 0; - -END; diff --git a/migrations/000009_character_social.down.sql b/migrations/000009_character_social.down.sql deleted file mode 100644 index 243ea6712..000000000 --- a/migrations/000009_character_social.down.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE characters - DROP COLUMN restrict_guild_scout; - -END; \ No newline at end of file diff --git a/migrations/000009_character_social.up.sql b/migrations/000009_character_social.up.sql deleted file mode 100644 index f94ce2043..000000000 --- a/migrations/000009_character_social.up.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE characters - ADD COLUMN restrict_guild_scout bool NOT NULL DEFAULT false; - -END; \ No newline at end of file diff --git a/migrations/000010_guild_comments_festival_hall.down.sql b/migrations/000010_guild_comments_festival_hall.down.sql deleted file mode 100644 index c86d1ee5e..000000000 --- a/migrations/000010_guild_comments_festival_hall.down.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN; - -ALTER TABLE guilds - DROP COLUMN comment, - DROP COLUMN festival_colour, - DROP COLUMN guild_hall; - -DROP TYPE festival_colour; - -END; \ No newline at end of file diff --git a/migrations/000010_guild_comments_festival_hall.up.sql b/migrations/000010_guild_comments_festival_hall.up.sql deleted file mode 100644 index 3caec4149..000000000 --- a/migrations/000010_guild_comments_festival_hall.up.sql +++ /dev/null @@ -1,11 +0,0 @@ -BEGIN; - -CREATE TYPE festival_colour AS ENUM ('none', 'red', 'blue'); - -ALTER TABLE guilds - ADD COLUMN comment varchar(255) NOT NULL DEFAULT '', - ADD COLUMN festival_colour festival_colour DEFAULT 'none', - ADD COLUMN guild_hall int DEFAULT 0; - - -END; \ No newline at end of file diff --git a/migrations/000011_character_points_minidata.down.sql b/migrations/000011_character_points_minidata.down.sql deleted file mode 100644 index 557608be9..000000000 --- a/migrations/000011_character_points_minidata.down.sql +++ /dev/null @@ -1,24 +0,0 @@ -BEGIN; - -ALTER TABLE characters - DROP COLUMN minidata, - DROP COLUMN gacha_trial, - DROP COLUMN gacha_prem, - DROP COLUMN gacha_items, - DROP COLUMN daily_time, - DROP COLUMN frontier_points, - DROP COLUMN netcafe_points, - DROP COLUMN house_info, - DROP COLUMN login_boost, - DROP COLUMN skin_hist, - DROP COLUMN gcp; - -DROP TABLE fpoint_items; -DROP TABLE gacha_shop; -DROP TABLE gacha_shop_items; -DROP TABLE lucky_box_state; -DROP TABLE stepup_state; -DROP TABLE normal_shop_items; -DROP TABLE shop_item_state; - -END; \ No newline at end of file diff --git a/migrations/000011_character_points_minidata.up.sql b/migrations/000011_character_points_minidata.up.sql deleted file mode 100644 index 29baa0790..000000000 --- a/migrations/000011_character_points_minidata.up.sql +++ /dev/null @@ -1,100 +0,0 @@ -BEGIN; -ALTER TABLE characters - ADD COLUMN minidata bytea, - ADD COLUMN gacha_trial int, - ADD COLUMN gacha_prem int, - ADD COLUMN gacha_items bytea, - ADD COLUMN daily_time timestamp, - ADD COLUMN frontier_points int, - ADD COLUMN netcafe_points int, - ADD COLUMN house_info bytea, - ADD COLUMN login_boost bytea, - ADD COLUMN skin_hist bytea, - ADD COLUMN kouryou_point int, - ADD COLUMN gcp int; - -CREATE TABLE fpoint_items -( - hash int, - itemType uint8, - itemID uint16, - quant uint16, - itemValue uint16, - tradeType uint8 -); - - -CREATE TABLE gacha_shop -( - hash bigint, - reqGR int, - reqHR int, - gachaName varchar(255), - gachaLink0 varchar(255), - gachaLink1 varchar(255), - gachaLink2 varchar(255), - extraIcon int, - gachaType int, - hideFlag bool -); - -CREATE TABLE gacha_shop_items -( - shophash int, - entryType uint8, - itemhash int UNIQUE NOT NULL, - currType uint8, - currNumber uint16, - currQuant uint16, - percentage uint16, - rarityIcon uint8, - rollsCount uint8, - itemCount uint8, - dailyLimit uint8, - itemType int[], - itemId int[], - quantity int[] -); - -CREATE TABLE lucky_box_state -( - char_id bigint REFERENCES characters (id), - shophash int UNIQUE NOT NULL, - used_itemhash int[] -); - - -CREATE TABLE stepup_state -( - char_id bigint REFERENCES characters (id), - shophash int UNIQUE NOT NULL, - step_progression int, - step_time timestamp -); - -CREATE TABLE normal_shop_items -( - shoptype int, - shopid int, - itemhash int UNIQUE NOT NULL, - itemID uint16, - Points uint16, - TradeQuantity uint16, - rankReqLow uint16, - rankReqHigh uint16, - rankReqG uint16, - storeLevelReq uint16, - maximumQuantity uint16, - boughtQuantity uint16, - roadFloorsRequired uint16, - weeklyFatalisKills uint16 -); - -CREATE TABLE shop_item_state -( - char_id bigint REFERENCES characters (id), - itemhash int UNIQUE NOT NULL, - usedquantity int -); - -END; \ No newline at end of file diff --git a/migrations/000012_loginboost_etc.down.sql b/migrations/000012_loginboost_etc.down.sql deleted file mode 100644 index 13102b0b0..000000000 --- a/migrations/000012_loginboost_etc.down.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -DROP TABLE login_boost_state; - -END; \ No newline at end of file diff --git a/migrations/000012_loginboost_etc.up.sql b/migrations/000012_loginboost_etc.up.sql deleted file mode 100644 index 4feff1790..000000000 --- a/migrations/000012_loginboost_etc.up.sql +++ /dev/null @@ -1,13 +0,0 @@ -BEGIN; - -CREATE TABLE login_boost_state -( - char_id bigint REFERENCES characters (id), - week_req uint8, - week_count uint8, - available bool, - end_time int, - CONSTRAINT id_week UNIQUE(char_id, week_req) -); - -END; \ No newline at end of file diff --git a/migrations/000013_shop_constraints.down.sql b/migrations/000013_shop_constraints.down.sql deleted file mode 100644 index 7b5ac1242..000000000 --- a/migrations/000013_shop_constraints.down.sql +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN; - -ALTER TABLE shop_item_state DROP CONSTRAINT shop_item_state_id_itemhash; -ALTER TABLE shop_item_state ADD CONSTRAINT shop_item_state_itemhash_key UNIQUE (itemhash); - -ALTER TABLE stepup_state DROP CONSTRAINT stepup_state_id_shophash; -ALTER TABLE stepup_state ADD CONSTRAINT stepup_state_shophash_key UNIQUE (shophash); - -ALTER TABLE lucky_box_state DROP CONSTRAINT lucky_box_state_id_shophash; -ALTER TABLE lucky_box_state ADD CONSTRAINT lucky_box_state_shophash_key UNIQUE (shophash); - -END; \ No newline at end of file diff --git a/migrations/000013_shop_constraints.up.sql b/migrations/000013_shop_constraints.up.sql deleted file mode 100644 index a48e81ac2..000000000 --- a/migrations/000013_shop_constraints.up.sql +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN; - -ALTER TABLE shop_item_state DROP CONSTRAINT shop_item_state_itemhash_key; -ALTER TABLE shop_item_state ADD CONSTRAINT shop_item_state_id_itemhash UNIQUE(char_id, itemhash); - -ALTER TABLE stepup_state DROP CONSTRAINT stepup_state_shophash_key; -ALTER TABLE stepup_state ADD CONSTRAINT stepup_state_id_shophash UNIQUE(char_id, shophash); - -ALTER TABLE lucky_box_state DROP CONSTRAINT lucky_box_state_shophash_key; -ALTER TABLE lucky_box_state ADD CONSTRAINT lucky_box_state_id_shophash UNIQUE(char_id, shophash); - -END; \ No newline at end of file diff --git a/migrations/000014_guild_flags_applications.down.sql b/migrations/000014_guild_flags_applications.down.sql deleted file mode 100644 index 6cfe86288..000000000 --- a/migrations/000014_guild_flags_applications.down.sql +++ /dev/null @@ -1,18 +0,0 @@ -BEGIN; -ALTER TABLE guild_characters - RENAME COLUMN avoid_leadership TO is_sub_leader; - -ALTER TABLE guild_characters - ADD COLUMN is_applicant bool NOT NULL DEFAULT false; - -ALTER TABLE guilds - DROP COLUMN icon, - ALTER COLUMN main_motto TYPE varchar USING '', - DROP COLUMN sub_motto; - -ALTER TABLE guilds - ALTER COLUMN main_motto SET DEFAULT ''; - -DROP TABLE guild_applications; -DROP TYPE guild_application_type; -END; \ No newline at end of file diff --git a/migrations/000014_guild_flags_applications.up.sql b/migrations/000014_guild_flags_applications.up.sql deleted file mode 100644 index 4bc09668a..000000000 --- a/migrations/000014_guild_flags_applications.up.sql +++ /dev/null @@ -1,30 +0,0 @@ -BEGIN; -CREATE TYPE guild_application_type AS ENUM ('applied', 'invited'); - -CREATE TABLE guild_applications -( - id serial NOT NULL PRIMARY KEY, - guild_id int NOT NULL REFERENCES guilds (id), - character_id int NOT NULL REFERENCES characters (id), - actor_id int NOT NULL REFERENCES characters (id), - application_type guild_application_type NOT NULL, - created_at timestamp NOT NULL DEFAULT now(), - CONSTRAINT guild_application_character_id UNIQUE (guild_id, character_id) -); - -CREATE INDEX guild_application_type_index ON guild_applications (application_type); - -ALTER TABLE guild_characters - DROP COLUMN is_applicant; - -ALTER TABLE guild_characters - RENAME COLUMN is_sub_leader TO avoid_leadership; - -ALTER TABLE guilds - ALTER COLUMN main_motto SET DEFAULT 0; - -ALTER TABLE guilds - ADD COLUMN icon bytea, - ADD COLUMN sub_motto int DEFAULT 0, - ALTER COLUMN main_motto TYPE int USING 0; -END; \ No newline at end of file diff --git a/migrations/000015_mail.down.sql b/migrations/000015_mail.down.sql deleted file mode 100644 index 8ed5b834f..000000000 --- a/migrations/000015_mail.down.sql +++ /dev/null @@ -1,3 +0,0 @@ -BEGIN; -DROP TABLE mail; -END; \ No newline at end of file diff --git a/migrations/000015_mail.up.sql b/migrations/000015_mail.up.sql deleted file mode 100644 index ba0dc4edd..000000000 --- a/migrations/000015_mail.up.sql +++ /dev/null @@ -1,19 +0,0 @@ -BEGIN; -CREATE TABLE mail -( - id SERIAL NOT NULL PRIMARY KEY, - sender_id INT NOT NULL REFERENCES characters (id), - recipient_id INT NOT NULL REFERENCES characters (id), - subject VARCHAR NOT NULL DEFAULT '', - body VARCHAR NOT NULL DEFAULT '', - read BOOL NOT NULL DEFAULT FALSE, - attached_item_received BOOL NOT NULL DEFAULT FALSE, - attached_item INT DEFAULT NULL, - attached_item_amount INT NOT NULL DEFAULT 1, - is_guild_invite BOOL NOT NULL DEFAULT FALSE, - created_at TIMESTAMP NOT NULL DEFAULT NOW(), - deleted BOOL NOT NULL DEFAULT FALSE -); - -CREATE INDEX mail_recipient_deleted_created_id_index ON mail (recipient_id, deleted, created_at DESC, id DESC); -END; \ No newline at end of file diff --git a/migrations/000016_server.down.sql b/migrations/000016_server.down.sql deleted file mode 100644 index a5fb2d6b0..000000000 --- a/migrations/000016_server.down.sql +++ /dev/null @@ -1,3 +0,0 @@ -BEGIN; -DROP TABLE public.servers; -END; \ No newline at end of file diff --git a/migrations/000016_server.up.sql b/migrations/000016_server.up.sql deleted file mode 100644 index f6a7798e7..000000000 --- a/migrations/000016_server.up.sql +++ /dev/null @@ -1,21 +0,0 @@ -BEGIN; --- Table: public.servers - --- DROP TABLE IF EXISTS public.servers; - -CREATE TABLE IF NOT EXISTS public.servers -( - server_id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), - server_name text COLLATE pg_catalog."default", - season integer, - current_players integer, - event_id integer, - event_expiration integer, - CONSTRAINT servers_pkey PRIMARY KEY (server_id) -) - -TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.servers - OWNER to postgres; -END; \ No newline at end of file diff --git a/migrations/000017_account.down.sql b/migrations/000017_account.down.sql deleted file mode 100644 index c52957af0..000000000 --- a/migrations/000017_account.down.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; -DROP TABLE public.account_ban; -DROP TABLE public.account_history; -DROP TABLE public.account_moderation; -DROP TABLE public.account_sub; -END; \ No newline at end of file diff --git a/migrations/000017_account.up.sql b/migrations/000017_account.up.sql deleted file mode 100644 index f636d619f..000000000 --- a/migrations/000017_account.up.sql +++ /dev/null @@ -1,45 +0,0 @@ -BEGIN; - -CREATE TABLE IF NOT EXISTS public.account_ban -( - user_id integer NOT NULL, - title text COLLATE pg_catalog."default", - reason text COLLATE pg_catalog."default", - date text COLLATE pg_catalog."default", - pass_origin text COLLATE pg_catalog."default", - pass_block text COLLATE pg_catalog."default", - CONSTRAINT ban_pkey PRIMARY KEY (user_id) -); - -CREATE TABLE IF NOT EXISTS public.account_history -( - report_id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), - user_id integer, - title text COLLATE pg_catalog."default", - reason text COLLATE pg_catalog."default", - date date, - CONSTRAINT account_history_pkey PRIMARY KEY (report_id) -); - -CREATE TABLE IF NOT EXISTS public.account_moderation -( - id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), - username text COLLATE pg_catalog."default", - password text COLLATE pg_catalog."default", - type text COLLATE pg_catalog."default", - CONSTRAINT account_moderation_pkey PRIMARY KEY (id) -); - -CREATE TABLE IF NOT EXISTS public.account_sub -( - id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), - discord_id text COLLATE pg_catalog."default", - erupe_account text COLLATE pg_catalog."default", - erupe_password text COLLATE pg_catalog."default", - date_inscription date, - country text COLLATE pg_catalog."default", - presentation text COLLATE pg_catalog."default", - CONSTRAINT account_auth_pkey PRIMARY KEY (id) -); - -END; \ No newline at end of file diff --git a/migrations/000018_event_week.down.sql b/migrations/000018_event_week.down.sql deleted file mode 100644 index 756df1f22..000000000 --- a/migrations/000018_event_week.down.sql +++ /dev/null @@ -1,3 +0,0 @@ -BEGIN; -DROP TABLE public.event_week; -END; \ No newline at end of file diff --git a/migrations/000018_event_week.up.sql b/migrations/000018_event_week.up.sql deleted file mode 100644 index f536871f2..000000000 --- a/migrations/000018_event_week.up.sql +++ /dev/null @@ -1,11 +0,0 @@ -BEGIN; - -CREATE TABLE IF NOT EXISTS public.event_week -( - id integer NOT NULL, - event_id integer NOT NULL, - date_expiration integer NOT NULL, - CONSTRAINT event_week_pkey PRIMARY KEY (id) -); - -END; \ No newline at end of file diff --git a/migrations/000019_gook.down.sql b/migrations/000019_gook.down.sql deleted file mode 100644 index a4b544e9a..000000000 --- a/migrations/000019_gook.down.sql +++ /dev/null @@ -1,3 +0,0 @@ -BEGIN; -DROP TABLE public.gook; -END; \ No newline at end of file diff --git a/migrations/000019_gook.up.sql b/migrations/000019_gook.up.sql deleted file mode 100644 index fe5c051c0..000000000 --- a/migrations/000019_gook.up.sql +++ /dev/null @@ -1,20 +0,0 @@ -BEGIN; - -CREATE TABLE IF NOT EXISTS public.gook -( - id serial NOT NULL PRIMARY KEY, - gook0 bytea, - gook1 bytea, - gook2 bytea, - gook3 bytea, - gook4 bytea, - gook5 bytea, - gook0status boolean, - gook1status boolean, - gook2status boolean, - gook3status boolean, - gook4status boolean, - gook5status boolean -); - -END; \ No newline at end of file diff --git a/migrations/000020_history.down.sql b/migrations/000020_history.down.sql deleted file mode 100644 index 623bd53c8..000000000 --- a/migrations/000020_history.down.sql +++ /dev/null @@ -1,3 +0,0 @@ -BEGIN; -DROP TABLE public.history; -END; \ No newline at end of file diff --git a/migrations/000020_history.up.sql b/migrations/000020_history.up.sql deleted file mode 100644 index 96d6b36c8..000000000 --- a/migrations/000020_history.up.sql +++ /dev/null @@ -1,13 +0,0 @@ -BEGIN; - -CREATE TABLE IF NOT EXISTS public.history -( - user_id integer, - admin_id integer, - report_id integer NOT NULL, - title text COLLATE pg_catalog."default", - reason text COLLATE pg_catalog."default", - CONSTRAINT history_pkey PRIMARY KEY (report_id) -); - -END; \ No newline at end of file