mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
repository cleanup
This commit is contained in:
10
migrations/000001_initial_db.down.sql
Normal file
10
migrations/000001_initial_db.down.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
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;
|
||||
37
migrations/000001_initial_db.up.sql
Normal file
37
migrations/000001_initial_db.up.sql
Normal file
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
8
migrations/000002_alter_characters.down.sql
Normal file
8
migrations/000002_alter_characters.down.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE characters
|
||||
DROP COLUMN exp,
|
||||
DROP COLUMN weapon,
|
||||
DROP COLUMN last_login;
|
||||
|
||||
END;
|
||||
8
migrations/000002_alter_characters.up.sql
Normal file
8
migrations/000002_alter_characters.up.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE characters
|
||||
ADD COLUMN exp uint16,
|
||||
ADD COLUMN weapon uint16,
|
||||
ADD COLUMN last_login integer;
|
||||
|
||||
END;
|
||||
6
migrations/000003_character_savedata.down.sql
Normal file
6
migrations/000003_character_savedata.down.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE characters
|
||||
DROP COLUMN savedata;
|
||||
|
||||
END;
|
||||
6
migrations/000003_character_savedata.up.sql
Normal file
6
migrations/000003_character_savedata.up.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE characters
|
||||
ADD COLUMN savedata bytea;
|
||||
|
||||
END;
|
||||
13
migrations/000004_character_additional.down.sql
Normal file
13
migrations/000004_character_additional.down.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
14
migrations/000004_character_additional.up.sql
Normal file
14
migrations/000004_character_additional.up.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
5
migrations/000005_quests.down.sql
Normal file
5
migrations/000005_quests.down.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE IF EXISTS questlists;
|
||||
|
||||
END;
|
||||
8
migrations/000005_quests.up.sql
Normal file
8
migrations/000005_quests.up.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE questlists (
|
||||
ind int NOT NULL PRIMARY KEY,
|
||||
questlist bytea
|
||||
);
|
||||
|
||||
END;
|
||||
6
migrations/000006_mercenary.down.sql
Normal file
6
migrations/000006_mercenary.down.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE characters
|
||||
DROP COLUMN savemercenary;
|
||||
|
||||
END;
|
||||
6
migrations/000006_mercenary.up.sql
Normal file
6
migrations/000006_mercenary.up.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE characters
|
||||
ADD COLUMN savemercenary bytea;
|
||||
|
||||
END;
|
||||
6
migrations/000007_guilds.down.sql
Normal file
6
migrations/000007_guilds.down.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE guild_characters;
|
||||
DROP TABLE guilds;
|
||||
|
||||
END;
|
||||
22
migrations/000007_guilds.up.sql
Normal file
22
migrations/000007_guilds.up.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
11
migrations/000008_guild_additional.down.sql
Normal file
11
migrations/000008_guild_additional.down.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
11
migrations/000008_guild_additional.up.sql
Normal file
11
migrations/000008_guild_additional.up.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
6
migrations/000009_character_social.down.sql
Normal file
6
migrations/000009_character_social.down.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE characters
|
||||
DROP COLUMN restrict_guild_scout;
|
||||
|
||||
END;
|
||||
6
migrations/000009_character_social.up.sql
Normal file
6
migrations/000009_character_social.up.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE characters
|
||||
ADD COLUMN restrict_guild_scout bool NOT NULL DEFAULT false;
|
||||
|
||||
END;
|
||||
10
migrations/000010_guild_comments_festival_hall.down.sql
Normal file
10
migrations/000010_guild_comments_festival_hall.down.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE guilds
|
||||
DROP COLUMN comment,
|
||||
DROP COLUMN festival_colour,
|
||||
DROP COLUMN guild_hall;
|
||||
|
||||
DROP TYPE festival_colour;
|
||||
|
||||
END;
|
||||
11
migrations/000010_guild_comments_festival_hall.up.sql
Normal file
11
migrations/000010_guild_comments_festival_hall.up.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
24
migrations/000011_character_points_minidata.down.sql
Normal file
24
migrations/000011_character_points_minidata.down.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
100
migrations/000011_character_points_minidata.up.sql
Normal file
100
migrations/000011_character_points_minidata.up.sql
Normal file
@@ -0,0 +1,100 @@
|
||||
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;
|
||||
5
migrations/000012_loginboost_etc.down.sql
Normal file
5
migrations/000012_loginboost_etc.down.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE login_boost_state;
|
||||
|
||||
END;
|
||||
13
migrations/000012_loginboost_etc.up.sql
Normal file
13
migrations/000012_loginboost_etc.up.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
12
migrations/000013_shop_constraints.down.sql
Normal file
12
migrations/000013_shop_constraints.down.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
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;
|
||||
12
migrations/000013_shop_constraints.up.sql
Normal file
12
migrations/000013_shop_constraints.up.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
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;
|
||||
18
migrations/000014_guild_flags_applications.down.sql
Normal file
18
migrations/000014_guild_flags_applications.down.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
30
migrations/000014_guild_flags_applications.up.sql
Normal file
30
migrations/000014_guild_flags_applications.up.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
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;
|
||||
3
migrations/000015_mail.down.sql
Normal file
3
migrations/000015_mail.down.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
BEGIN;
|
||||
DROP TABLE mail;
|
||||
END;
|
||||
19
migrations/000015_mail.up.sql
Normal file
19
migrations/000015_mail.up.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
3
migrations/000016_server.down.sql
Normal file
3
migrations/000016_server.down.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
BEGIN;
|
||||
DROP TABLE public.servers;
|
||||
END;
|
||||
21
migrations/000016_server.up.sql
Normal file
21
migrations/000016_server.up.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
6
migrations/000017_account.down.sql
Normal file
6
migrations/000017_account.down.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN;
|
||||
DROP TABLE public.account_ban;
|
||||
DROP TABLE public.account_history;
|
||||
DROP TABLE public.account_moderation;
|
||||
DROP TABLE public.account_sub;
|
||||
END;
|
||||
45
migrations/000017_account.up.sql
Normal file
45
migrations/000017_account.up.sql
Normal file
@@ -0,0 +1,45 @@
|
||||
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;
|
||||
3
migrations/000018_event_week.down.sql
Normal file
3
migrations/000018_event_week.down.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
BEGIN;
|
||||
DROP TABLE public.event_week;
|
||||
END;
|
||||
11
migrations/000018_event_week.up.sql
Normal file
11
migrations/000018_event_week.up.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
3
migrations/000019_gook.down.sql
Normal file
3
migrations/000019_gook.down.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
BEGIN;
|
||||
DROP TABLE public.gook;
|
||||
END;
|
||||
20
migrations/000019_gook.up.sql
Normal file
20
migrations/000019_gook.up.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
3
migrations/000020_history.down.sql
Normal file
3
migrations/000020_history.down.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
BEGIN;
|
||||
DROP TABLE public.history;
|
||||
END;
|
||||
13
migrations/000020_history.up.sql
Normal file
13
migrations/000020_history.up.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user