Skip to content

Add SolidErrors.migrated? to check the errors database schema - #113

Merged
fractaledmind merged 1 commit into
mainfrom
feature/migrated-check
Oct 16, 2026
Merged

fractaledmind merged 1 commit into
mainfrom
feature/migrated-check

Conversation

@fractaledmind

Copy link
Copy Markdown
Owner

Fixes #31.

SolidErrors.migrated? is true when the errors database has every table and column the installed version reads and writes. As #31 suggests, following GoodJob, apps can assert it in their test suite, so a schema change from an upgrade fails there and not in production:

assert SolidErrors.migrated?

Solid Errors ships one schema rather than migrations, so the check compares the tables against the columns this version uses. When a release changes the schema, that release updates the list in migrated? and adds the migration to UPGRADE.md.

Tests cover the current schema, a missing column, and a missing table. The tests that drop a column or table do so inside their test transaction, which rolls the change back.

🤖 Generated with Claude Code

Apps can assert it in their test suite so a schema change from an
upgrade fails there instead of in production. Fixes #31.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@fractaledmind
fractaledmind merged commit 90f75f0 into main Oct 16, 2026
17 checks passed
@fractaledmind
fractaledmind deleted the feature/migrated-check branch October 16, 2026 10:35
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.

Add SolidErrors::migrated? to ensure that automatically updated dependencies fail when missing migrations

1 participant