Further work on leaderboards

- Modularize tests
- Add migrations
- Fix switch case so it actually breaks
- Add in missing writes
- Beginning work on custom migration to move the leaderboard to the final state
This commit is contained in:
David Markowitz
2023-04-17 01:16:23 -07:00
parent ed2639ce4e
commit fcb088d263
8 changed files with 93 additions and 51 deletions

View File

@@ -0,0 +1 @@
# This migration is a mock. See the real migration in MigrationRunner::MigrateLeaderboard.

View File

@@ -0,0 +1,8 @@
ALTER TABLE leaderboard
ADD COLUMN hitPercentage FLOAT NOT NULL DEFAULT 0,
ADD COLUMN streak INT NOT NULL DEFAULT 0,
ADD COLUMN bestLapTime FLOAT NOT NULL DEFAULT 0,
ADD COLUMN numWins INT NOT NULL DEFAULT 0,
MODIFY time FLOAT NOT NULL DEFAULT 0;
ALTER TABLE leaderboard CHANGE time bestTime float;