Cloud sync: fixes

This commit is contained in:
M66B
2023-01-21 13:52:57 +01:00
parent f17aa78ad2
commit 76c6fc2e6c
2 changed files with 8 additions and 8 deletions

View File

@@ -561,7 +561,7 @@ public abstract class DB extends RoomDatabase {
" AFTER UPDATE ON account" +
" BEGIN" +
" UPDATE account SET last_modified = strftime('%s') * 1000" +
" WHERE id = NEW.id" +
" WHERE OLD.id = NEW.id" +
" AND OLD.last_modified = NEW.last_modified" +
" AND (NEW.auth_type = " + AUTH_TYPE_PASSWORD + " OR OLD.password = NEW.password)" +
" AND OLD.keep_alive_ok IS NEW.keep_alive_ok" +
@@ -580,7 +580,7 @@ public abstract class DB extends RoomDatabase {
" AFTER UPDATE ON identity" +
" BEGIN" +
" UPDATE identity SET last_modified = strftime('%s') * 1000" +
" WHERE id = NEW.id" +
" WHERE OLD.id = NEW.id" +
" AND OLD.last_modified = NEW.last_modified" +
" AND OLD.state IS NEW.state" +
" AND OLD.error IS NEW.error" +