Skip to content

Refuse to migrate a database with an unrecognized schema version - #497

Merged
tonygermano merged 1 commit into
OpenIntegrationEngine:mainfrom
tonygermano:fix/unrecognized-schema-version
Oct 18, 2026
Merged

tonygermano merged 1 commit into
OpenIntegrationEngine:mainfrom
tonygermano:fix/unrecognized-schema-version

Conversation

@tonygermano

Copy link
Copy Markdown
Member

ServerMigrator treated a SCHEMA_INFO version it could not find in the Version enum the same as an empty table, and started the migration chain at V0. Startup then failed in the first legacy delta script (derby-0-1.sql or its equivalent) with an error that says nothing about the real problem. On a stock schema that script fails at its first statement, but nothing guarded the path: had a step succeeded, updateVersion() would also have seen no current version and inserted a second SCHEMA_INFO row.

Stop with a MigrationException that names the version found, before any migrator runs. An empty SCHEMA_INFO table still starts at V0 as before.

Fixes #496.

@github-actions

Copy link
Copy Markdown

Test Results

129 files  +1  129 suites  +1   3m 48s ⏱️ + 1m 10s
731 tests +2  731 ✅ +2  0 💤 ±0  0 ❌ ±0 
821 runs  +2  815 ✅ +2  6 💤 ±0  0 ❌ ±0 

Results for commit 1d8a682. ± Comparison against base commit f9ba73e.

ServerMigrator treated a SCHEMA_INFO version it could not find in the
Version enum the same as an empty table, and started the migration
chain at V0. Startup then failed in the first legacy delta script
(derby-0-1.sql or its equivalent) with an error that says nothing about
the real problem. On a stock schema that script fails at its first
statement, but nothing guarded the path: had a step succeeded,
updateVersion() would also have seen no current version and inserted a
second SCHEMA_INFO row.

Stop with a MigrationException that names the version found, before any
migrator runs. An empty SCHEMA_INFO table still starts at V0 as before.

Fixes OpenIntegrationEngine#496.

Issue: OpenIntegrationEngine#496
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Tony Germano <tony@germano.name>
@tonygermano
tonygermano force-pushed the fix/unrecognized-schema-version branch from 1d8a682 to bd03dc7 Compare October 18, 2026 03:36
@tonygermano
tonygermano merged commit bd03dc7 into OpenIntegrationEngine:main Oct 18, 2026
2 checks passed
@tonygermano
tonygermano deleted the fix/unrecognized-schema-version branch October 18, 2026 03:57
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.

Unrecognized database schema version is treated as a pre-2.0 database

4 participants