mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 07:22:13 +00:00
only migrate if not yet opened
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
5bcb3b3efe
commit
236d94622c
1 changed files with 12 additions and 7 deletions
|
|
@ -159,7 +159,12 @@ Future<void> runMigrations() async {
|
||||||
for (final messageId in messageIds.first.split(',')) {
|
for (final messageId in messageIds.first.split(',')) {
|
||||||
await (twonlyDB.update(
|
await (twonlyDB.update(
|
||||||
twonlyDB.messages,
|
twonlyDB.messages,
|
||||||
)..where((tbl) => tbl.messageId.equals(messageId))).write(
|
)..where(
|
||||||
|
(tbl) =>
|
||||||
|
tbl.messageId.equals(messageId) &
|
||||||
|
(tbl.openedByAll.isNull() | tbl.openedAt.isNull()),
|
||||||
|
))
|
||||||
|
.write(
|
||||||
MessagesCompanion(
|
MessagesCompanion(
|
||||||
openedAt: Value(now),
|
openedAt: Value(now),
|
||||||
openedByAll: Value(now),
|
openedByAll: Value(now),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue