Skip to content

Preserve review databases across legacy version relabeling - #4

Merged
RaycarlLei merged 1 commit into
mainfrom
fix/review-schema-reupgrade
Sep 8, 2026
Merged

RaycarlLei merged 1 commit into
mainfrom
fix/review-schema-reupgrade

Conversation

@RaycarlLei

Copy link
Copy Markdown
Owner

WordAI 0.1.2 opens SQLite with schema version 3 and no downgrade callback. With the pinned sqflite implementation, it can lower a version-4 database's version number while leaving the fingerprint column intact. A subsequent upgrade would try to add the same column and fail.

Recognize the existing nullable TEXT column during migration, preserving its values and learning progress. Reject incompatible column shapes instead of silently marking them upgraded. Explicitly reject databases from future app versions without lowering their version or deleting data. This prepares the same unreleased 0.1.3+4 build.

Real file-backed tests exercise version 4 → legacy version-3 open → version 4, legacy NULL snapshots, preservation of completed attempts, conflicting column shapes, and rejection of a future schema. Focused repository tests and analysis passed locally; CI validates both supported Flutter versions and builds the debug APK.

@RaycarlLei
RaycarlLei merged commit 35969ff into main Sep 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant