mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 18:24:10 +02:00
team archive more
This commit is contained in:
parent
59e41ba7a7
commit
b5b7bc953a
8 changed files with 215 additions and 3 deletions
30
archiver/migrations/20250416070625_player.sql
Normal file
30
archiver/migrations/20250416070625_player.sql
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
CREATE TYPE player_class AS ENUM ('scout', 'soldier', 'pyro', 'demoman', 'engineer', 'heavy', 'medic', 'sniper', 'spy');
|
||||
|
||||
CREATE TABLE players
|
||||
(
|
||||
steam_id BIGINT NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
avatar VARCHAR,
|
||||
favorite_classes player_class[] NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX players_steam_id_idx
|
||||
ON players USING BTREE (steam_id);
|
||||
|
||||
CREATE TABLE player_honors
|
||||
(
|
||||
steam_id BIGINT NOT NULL,
|
||||
team_id INT NOT NULL,
|
||||
season SMALLINT NOT NULL,
|
||||
division VARCHAR NOT NULL,
|
||||
format game_mode NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX player_honors_steam_id_idx
|
||||
ON player_honors USING BTREE (steam_id);
|
||||
|
||||
CREATE INDEX player_honors_team_id_idx
|
||||
ON player_honors USING BTREE (team_id);
|
||||
|
||||
CREATE INDEX player_honors_season_idx
|
||||
ON player_honors USING BTREE (season);
|
||||
Loading…
Add table
Add a link
Reference in a new issue