diff --git a/install/database_schema.sql b/install/database_schema.sql index 78313ac..60ede03 100644 --- a/install/database_schema.sql +++ b/install/database_schema.sql @@ -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,