minor updates to database schema
This commit is contained in:
parent
a813c1521a
commit
6e562937fb
1 changed files with 8 additions and 2 deletions
|
@ -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,
|
||||
|
||||
|
|
Loading…
Reference in a new issue