Finalize Dexie-to-SQLite migration prep: docs, circular dep removal, SQL helpers, tests
- Removed all vestigial Dexie/USE_DEXIE_DB references from code and docs - Centralized DB logic in PlatformServiceMixin; resolved logger/databaseUtil circular dependency - Modularized SQL helpers (`$generateInsertStatement`, `$generateUpdateStatement`) and added unit tests - Created/updated migration tracking docs and helper script for cross-machine progress - Confirmed all lint/type checks and tests pass; ready for systematic file migration
This commit is contained in:
@@ -19,8 +19,8 @@ and expand to crowd-fund with time & money, then record and see the impact of co
|
||||
The migration is controlled by a **migration fence** that separates legacy Dexie code from the new SQLite implementation. See [Migration Fence Definition](doc/migration-fence-definition.md) for complete details.
|
||||
|
||||
**Key Points**:
|
||||
- Legacy Dexie database is disabled by default (`USE_DEXIE_DB = false`)
|
||||
- All database operations go through `PlatformService`
|
||||
- Legacy Dexie database is disabled by default
|
||||
- All database operations go through `PlatformServiceMixin`
|
||||
- Migration tools provide controlled access to both databases
|
||||
- Clear separation between legacy and new code
|
||||
|
||||
@@ -100,7 +100,7 @@ The application uses a platform-agnostic database layer with Vue mixins for serv
|
||||
|
||||
- Always use `PlatformServiceMixin` for database operations in components
|
||||
- Never import Dexie directly in application code
|
||||
- Test with `USE_DEXIE_DB = false` for new features
|
||||
- Test with PlatformServiceMixin for new features
|
||||
- Use migration tools for data transfer between systems
|
||||
- Leverage mixin's ultra-concise methods: `$db()`, `$exec()`, `$one()`, `$contacts()`, `$settings()`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user