diff --git a/migrations/20260831172036_create_table_skins.sql b/migrations/20260831172036_create_table_skins.sql new file mode 100644 index 0000000..bc9d540 --- /dev/null +++ b/migrations/20260831172036_create_table_skins.sql @@ -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 +); \ No newline at end of file