Upgrade hive database version to 2

(cherry picked from commit 717d8953ce6a14c8cf7d23f64e206009f6ba1b32)
This commit is contained in:
dab246
2023-04-25 18:15:21 +07:00
committed by Dat Vu
parent 550752a2a4
commit 7d0a5729b2
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -64,9 +64,7 @@ class CachingManager {
Future<void> onUpgradeCache(int oldVersion, int newVersion) async {
log('CachingManager::onUpgradeCache():oldVersion $oldVersion | newVersion: $newVersion');
if (oldVersion == 0 && newVersion >= 1) {
await clearData();
}
await clearData();
await storeCacheVersion(newVersion);
return Future.value();
}
@@ -1,4 +1,4 @@
class CacheVersion {
static const int hiveDBVersion = 1;
static const int hiveDBVersion = 2;
}