Added migration for tables for skins

This commit is contained in:
2026-08-31 23:47:15 +02:00
parent d78de75c5e
commit e1652f4b07

View File

@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS weapons (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
name varchar NOT NULL,
display varchar NOT NULL,
def_index integer NOT NULL,
category varchar NOT NULL,
team integer NOT NULL -- 0 = CT, 1 = T, 2 = BOTH
);
CREATE TABLE IF NOT EXISTS rarity (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
display varchar NOT NULL,
color varchar NOT NULL
);
CREATE TABLE IF NOT EXISTS skins (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
weapon uuid REFERENCES weapons(id),
rarity uuid REFERENCES rarity(id),
paint_index integer NOT NULL,
display varchar NOT NULL,
min_float float NOT NULL,
max_float float NOT NULL,
legacy boolean NOT NULL
);