feat(store): import the dmfs database and make Room the default
Phase 4 of docs/OWN-STORE.md. OneShotImport reads databases/tasks.db directly — read-only, no provider, no ContentResolver — and writes it into Room in one verified transaction. dmfs row ids are remapped in two passes, because a parent can carry a higher _id than its child. The archive happens before the import, not after, and the import always replaces. That is what actually closes the crash window the plan's "flag *and* rename" is meant to cover: renaming last leaves the flag unset with tasks.db still in place, so the next launch imports a second copy. In this order every kill point re-enters correctly. Recurrence overrides are carried across as master_id/recurrence_id rather than ignored. dmfs stores them as ordinary rows sharing their master's _uid, so importing one as a second master would collide on the unique index and abort the whole import. autoMode now answers OWN, and a stored LOCAL reads as OWN — after the import the dmfs file has been renamed away, so someone who chose local storage explicitly must land on the store their data is now in. StartupGate holds the first store read until the mode has landed and the import has run; showing an upgrading user an empty app is the worst thing this migration could do. The backup rules take the database with its WAL sidecars and exclude the archive, and the app checkpoints on ON_STOP.
This commit is contained in:
@@ -113,6 +113,8 @@ androidx-navigation-compose = { group = "androidx.navigation", name = "navigatio
|
||||
|
||||
# Lifecycle compose (for collectAsStateWithLifecycle)
|
||||
androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycleCompose" }
|
||||
# ProcessLifecycleOwner — the WAL checkpoint hangs off ON_STOP.
|
||||
androidx-lifecycle-process = { group = "androidx.lifecycle", name = "lifecycle-process", version.ref = "lifecycleRuntime" }
|
||||
|
||||
# Glance — Jetpack home-screen widgets (Compose-like RemoteViews)
|
||||
androidx-glance-appwidget = { group = "androidx.glance", name = "glance-appwidget", version.ref = "glance" }
|
||||
|
||||
Reference in New Issue
Block a user