Updated insert mode to fix problem with replacing existing player match connections

This commit is contained in:
2025-12-30 18:21:39 +01:00
parent 4c8896d2d9
commit 356cb1fb43
2 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ class GroupMatchDao extends DatabaseAccessor<AppDatabase>
} }
await into(groupMatchTable).insert( await into(groupMatchTable).insert(
GroupMatchTableCompanion.insert(groupId: groupId, matchId: matchId), GroupMatchTableCompanion.insert(groupId: groupId, matchId: matchId),
mode: InsertMode.insertOrReplace, mode: InsertMode.insertOrIgnore,
); );
} }

View File

@@ -18,7 +18,7 @@ class PlayerMatchDao extends DatabaseAccessor<AppDatabase>
}) async { }) async {
await into(playerMatchTable).insert( await into(playerMatchTable).insert(
PlayerMatchTableCompanion.insert(playerId: playerId, matchId: matchId), PlayerMatchTableCompanion.insert(playerId: playerId, matchId: matchId),
mode: InsertMode.insertOrReplace, mode: InsertMode.insertOrIgnore,
); );
} }
@@ -121,7 +121,7 @@ class PlayerMatchDao extends DatabaseAccessor<AppDatabase>
inserts.map( inserts.map(
(c) => into( (c) => into(
playerMatchTable, playerMatchTable,
).insert(c, mode: InsertMode.insertOrReplace), ).insert(c, mode: InsertMode.insertOrIgnore),
), ),
); );
} }