From 6e562937fb70bf5f8e2159f3bd604cb6fe95caaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Wed, 22 Nov 2023 14:32:41 +0100 Subject: [PATCH] minor updates to database schema --- install/database_schema.sql | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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,