From 229838fca6ee4abf812ab8a16b906f28d316c01a Mon Sep 17 00:00:00 2001 From: Bindu Date: Sun, 9 Jul 2023 20:58:12 -0700 Subject: [PATCH] Update db version to fix SQL error on latest release --- lib/core/singletons/database.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/singletons/database.dart b/lib/core/singletons/database.dart index 58cb8ddea..16986efe1 100644 --- a/lib/core/singletons/database.dart +++ b/lib/core/singletons/database.dart @@ -30,14 +30,14 @@ class DB { Future _init() async { return await openDatabase( join(await getDatabasesPath(), 'thunder.db'), - version: 2, + version: 3, onCreate: (db, version) { return db.execute('CREATE TABLE accounts(accountId STRING PRIMARY KEY, username TEXT, jwt TEXT, instance TEXT, userId INTEGER)'); }, onUpgrade: (db, oldVersion, newVersion) async { var batch = db.batch(); - if (oldVersion == 1) { + if (oldVersion < 3) { _updateTableAccountsV1toV2(batch); }