Skip to content

Commit

Permalink
Update db version to fix SQL error on latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
vbh committed Jul 11, 2023
1 parent 0db6505 commit 229838f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/singletons/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class DB {
Future<Database> _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);
}

Expand Down

0 comments on commit 229838f

Please sign in to comment.