diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-02-11 01:01:04 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-02-12 12:04:43 +0100 |
commit | a764abe6565544bea8591b26839ad931f3f42e4d (patch) | |
tree | b085b01746fb339a55e06c2423cdb90bf674581c /schema.sql | |
parent | 61e0d18ed045ed89ba9abd711fe7b1b5be2ec095 (diff) | |
download | server-a764abe6565544bea8591b26839ad931f3f42e4d.tar.gz |
Use state.active to detect finished games.
Instead of looking for (state.state === "game_over").
Add is_active_role helper function.
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -137,7 +137,7 @@ create view user_dynamic_view as status = 1 and user_count = player_count and players.user_id = users.user_id - and active in ( players.role, 'Both' ) + and active in ( 'Both', players.role ) ) + ( select count(*) @@ -875,7 +875,7 @@ begin update players set clock = clock - (julianday() - julianday(old.mtime)) where - players.game_id = old.game_id and players.role in ( 'Both', old.active ); + players.game_id = old.game_id and old.active in ( 'Both', players.role ); end; -- Trigger to remove game data when filing a game as archived |