You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lite: an older app stops collecting for 13 tables on a newer data file, and a failed schema step is stamped as done #4727
Two problems in how Lite's DuckDbInitializer handles the data file's schema version. Line numbers are as of 1248a67.
1. No guard for a data file newer than the app
Lite/Database/DuckDbInitializer.cs:792,808-811 has no branch for a schema version newer than the app's. An older Lite (after a rollback, or an older portable copy) opens the shared data root (App.xaml.cs:470-488). Schema versions 60 to 65 added columns to 13 tables. So every batch for those tables fails, and the only sign is a line in the log.
Expected: Lite refuses to open a data file stamped with a newer schema version, with a message that names both versions. A read-only open is not enough, because the collectors still fail. The message follows Lite's existing startup error pattern.
Test that must fail first: a data file stamped one version above the app's is refused, and nothing is written to it.
2. Versions 60 to 65 are stamped even when an ALTER failed
DuckDbInitializer.cs:2045-2356. When an ALTER in one of these steps fails, the version is stamped anyway. The step never runs again, so that table's batches keep failing. The trigger is a transient fault during the one start that runs the step.
Expected: stamp the version only when every ALTER in the step succeeded, or re-run the idempotent ALTERs on each start.
Test that must fail first: a step with one failing ALTER leaves the version unstamped, and the next start completes it.
Activity
Lite re-applies the columns versions 60 to 65 added on every start, s…
Lite schema pins: the v63 and v64 tests read the versioned AddedColum…
Lite: refuse a newer data file, re-apply newer columns on every start…