minor updates to database schema

This commit is contained in:
Maximilian Keßler 2023-11-22 14:32:41 +01:00
parent a813c1521a
commit 6e562937fb
Signed by: max
GPG Key ID: BCC5A619923C0BA5

View File

@ -69,6 +69,7 @@ DROP TABLE IF EXISTS users;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL
discord_tag TEXT,
);
@ -276,12 +277,17 @@ CREATE TABLE user_base_ratings (
);
CREATE TABLE user_ratings (
/** This should reference the game that triggered the elo update */
/** This should reference the game that triggered the elo update. I would use the league_id here for proper ordering. */
league_id INTEGER PRIMARY KEY REFERENCES games,
user_id SMALLINT NOT NULL,
type SMALLINT NOT NULL,
/**
* Do we want to store this here as well? Would be nice to be displayed in some elo page imo.
* Note: We don't need to store the result (i guess), since we can easily retrieve that info by looking up the game using the league_id
*/
team_rating REAL NOT NULL,
change REAL NOT NULL,
value_after REAL NOT NULL,