export starting_player of games as well

This commit is contained in:
Maximilian Keßler 2023-06-24 18:35:15 +02:00
parent 9713bc7f7b
commit 7845c79889
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -88,10 +88,10 @@ def detailed_export_game(game_id: int, score: Optional[int] = None, var_id: Opti
cur.execute( cur.execute(
"INSERT INTO games (" "INSERT INTO games ("
"id, num_players, score, seed, variant_id, deck_plays, one_extra_card, one_less_card," "id, num_players, starting_player, score, seed, variant_id, deck_plays, one_extra_card, one_less_card,"
"all_or_nothing, actions" "all_or_nothing, actions"
")" ")"
"VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)" "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
"ON CONFLICT (id) DO UPDATE SET (" "ON CONFLICT (id) DO UPDATE SET ("
"deck_plays, one_extra_card, one_less_card, all_or_nothing, actions" "deck_plays, one_extra_card, one_less_card, all_or_nothing, actions"
") = (" ") = ("
@ -99,7 +99,7 @@ def detailed_export_game(game_id: int, score: Optional[int] = None, var_id: Opti
"EXCLUDED.actions" "EXCLUDED.actions"
")", ")",
( (
game_id, num_players, score, seed, var_id, deck_plays, one_extra_card, one_less_card, game_id, num_players, starting_player, score, seed, var_id, deck_plays, one_extra_card, one_less_card,
all_or_nothing, compressed_actions all_or_nothing, compressed_actions
) )
) )