Files
YaeMikoBot/scripts/postgres/04-waifus.sql
2026-01-13 13:27:42 +03:00

15 lines
502 B
SQL

BEGIN TRANSACTION;
CREATE TABLE waifus(
id serial PRIMARY KEY,
name text DEFAULT '' NOT NULL,
rarity int DEFAULT 3 NOT NULL,
exp_bonus decimal(4,2) DEFAULT 1,
money_bonus decimal(4, 2) DEFAULT 1,
market_price decimal(20, 0) DEFAULT 1000000,
fandom text DEFAULT '' NOT NULL,
image text DEFAULT '' NOT NULL,
owner_id int REFERENCES users(id)
);
CREATE UNIQUE INDEX waifus_uindex ON waifus(id);
CREATE INDEX waifus_index ON waifus(fandom, owner_id);
COMMIT TRANSACTION;