Updated insert mode to fix problem with replacing existing player match connections
This commit is contained in:
@@ -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,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user