Skip to content

2.10 Changes Data Layer Without Migration #2832

@nzjrs

Description

@nzjrs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    data layerPertains to data layers.needs-triagestaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions