Default local storage to Hive with legacy migration
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user