-
Notifications
You must be signed in to change notification settings - Fork 1.7k
2.10 Changes Data Layer Without Migration #2832
Copy link
Copy link
Open
Labels
data layerPertains to data layers.Pertains to data layers.needs-triagestaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Description
PR #2818 added autoCollapse to StepDict.to_dict(), so sql_alchemy.py now includes it in the INSERT. No migration was added though, so existing databases blow up
sqlite3.OperationalError: table steps has no column named autoCollapse
modes in v2.9.4 had the same issue but at least got a callout in the release notes with an ALTER TABLE instruction. This one just silently breaks.
The underlying problem is that sql_alchemy.py builds SQL dynamically from to_dict() keys so any new field on StepDict becomes a column reference with no check that the column exists. This will keep happening every time someone adds a field. Please add a comment to StepDict to remind maintainers that migrations will be needed upon change.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
data layerPertains to data layers.Pertains to data layers.needs-triagestaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed