Default local storage to Hive with legacy migration

This commit is contained in:
Rijad Zuzo
2026-02-15 19:17:25 +01:00
parent 21c911ad4c
commit 1502360051
8 changed files with 142 additions and 10 deletions
+8
View File
@@ -20,8 +20,16 @@ Implemented a persistence boundary so local app state is no longer tightly coupl
- schema migration hook retained and now store-agnostic
- Added config flag for local backend selection:
- `lib/core/config/app_config.dart` -> `USE_HIVE_LOCAL_DB`
- default now set to Hive (`true`)
- Added one-time migration path from legacy shared prefs into Hive:
- `lib/features/local/local_repository.dart`
- when Hive is active and empty, legacy payload is imported then cleared
- Added setup docs for switching local persistence backend:
- `docs/SETUP.md`
- Added migration/storage tests:
- `test/features/local/storage/local_data_store_shared_prefs_test.dart`
- `test/features/local/storage/local_repository_store_override_test.dart`
- `test/features/local/storage/local_repository_hive_migration_test.dart`
This prepares the app for a true DB migration path while keeping existing UX and tests stable.