Fix MySQL connections + remove type CHECK constraint#5
Merged
Conversation
The connections table CHECK constraint only allowed 'postgresql' and 'sqlite', crashing the server when storing MySQL connections. Add 'mysql' to migration 1 for fresh databases and add migration 9 to recreate the table for existing installations. The migration runner now supports a disableForeignKeys flag to safely handle table recreation without cascade-deleting child table data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The connection type is already validated at the application level (TypeScript types + driver registry). The DB-level CHECK constraint only causes painful table-recreation migrations every time a new database type is added. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The lockfile was out of sync with package.json since 4e9a5cf removed electron dependencies without regenerating it, causing CI to fail with --frozen-lockfile. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Run dprint fmt to fix markdown table alignment and long lines in app-db tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CHECK(type IN (...))constraint from theconnectionstable entirely — both in migration 1 (fresh DBs) and migration 9 (existing DBs)Test plan
bun test tests/app-db.test.ts— all 90 tests pass🤖 Generated with Claude Code