-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TF-825 Upgrade hive database version to 11
- Loading branch information
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
lib/features/base/upgradeable/upgrade_hive_database_steps_v11.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
import 'package:tmail_ui_user/features/base/upgradeable/upgrade_database_steps.dart'; | ||
import 'package:tmail_ui_user/features/caching/caching_manager.dart'; | ||
|
||
class UpgradeHiveDatabaseStepsV11 extends UpgradeDatabaseSteps { | ||
|
||
final CachingManager _cachingManager; | ||
|
||
UpgradeHiveDatabaseStepsV11(this._cachingManager); | ||
|
||
@override | ||
Future<void> onUpgrade(int oldVersion, int newVersion) async { | ||
if (oldVersion > 0 && oldVersion < newVersion && newVersion == 11) { | ||
await _cachingManager.clearEmailCacheAndAllStateCache(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
class CacheVersion { | ||
static const int hiveDBVersion = 10; | ||
static const int hiveDBVersion = 11; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters