Link personal bests to their recorded matches
This commit is contained in:
@@ -360,6 +360,10 @@ export function db(): Database.Database {
|
||||
assertSnapshotSchemeSafe(handle);
|
||||
migrateGameTelemetry(handle);
|
||||
migrateTable(handle, 'leaderboard_matches', [{ name: 'start_players', ddl: 'ALTER TABLE leaderboard_matches ADD COLUMN start_players INTEGER' }]);
|
||||
migrateTable(handle, 'leaderboard_match_players', [
|
||||
{ name: 'first_observed_round', ddl: 'ALTER TABLE leaderboard_match_players ADD COLUMN first_observed_round INTEGER' },
|
||||
{ name: 'present_at_start', ddl: 'ALTER TABLE leaderboard_match_players ADD COLUMN present_at_start INTEGER' }
|
||||
]);
|
||||
backfillLeaderboard(handle);
|
||||
initializeFleetSettings(handle);
|
||||
} catch (err) {
|
||||
|
||||
@@ -55,6 +55,8 @@ CREATE TABLE IF NOT EXISTS leaderboard_match_players (
|
||||
completed INTEGER NOT NULL DEFAULT 0,
|
||||
first_seen_at TEXT NOT NULL,
|
||||
last_seen_at TEXT NOT NULL,
|
||||
first_observed_round INTEGER, -- null for legacy participation
|
||||
present_at_start INTEGER, -- null for legacy participation; one only when first seen in game_start
|
||||
PRIMARY KEY (match_id, guid)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_leaderboard_player_matches ON leaderboard_match_players(guid, match_id);
|
||||
|
||||
Reference in New Issue
Block a user