Files
sweetgum-server/src/main/resources/db/migration/postgresql/V0.10__ban.sql
P0nk 40425ac4e1 Ban ip, macs & hwid in PG
Finally rid of all db code in Client
2024-10-03 19:17:01 +02:00

27 lines
672 B
SQL

CREATE TABLE ip_ban
(
ip varchar(15) NOT NULL,
account_id integer,
created_at timestamp DEFAULT now() NOT NULL,
PRIMARY KEY (ip)
);
GRANT SELECT, INSERT ON TABLE ip_ban TO ${server-username};
CREATE TABLE hwid_ban
(
hwid varchar(30) NOT NULL,
account_id integer,
created_at timestamp DEFAULT now() NOT NULL,
PRIMARY KEY (hwid)
);
GRANT SELECT, INSERT ON TABLE hwid_ban TO ${server-username};
CREATE TABLE mac_ban
(
mac varchar(30) NOT NULL,
account_id integer,
created_at timestamp DEFAULT now() NOT NULL,
PRIMARY KEY (mac)
);
GRANT SELECT, INSERT ON TABLE mac_ban TO ${server-username};