Skip to content

fix: handle AddForeignKey and DropConstraint on SQLite via table recreation#42

Merged
Mastersam07 merged 3 commits into
devfrom
fix/sqlite-add-drop-foreign-key-via-table-recreation
Mar 16, 2026
Merged

fix: handle AddForeignKey and DropConstraint on SQLite via table recreation#42
Mastersam07 merged 3 commits into
devfrom
fix/sqlite-add-drop-foreign-key-via-table-recreation

Conversation

@Mastersam07
Copy link
Copy Markdown
Contributor

SQLite does not support ALTER TABLE ... ADD CONSTRAINT or DROP CONSTRAINT. Added table recreation handling for both operations, matching the existing AlterColumn approach. Extended generateTableRecreationSql with addForeignKey and dropConstraintName parameters.

@Mastersam07 Mastersam07 marked this pull request as ready for review March 16, 2026 06:43
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/jao/lib/src/db/adapters/sqlite.dart 69.23% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Mastersam07 Mastersam07 merged commit 993e477 into dev Mar 16, 2026
7 checks passed
@Mastersam07 Mastersam07 deleted the fix/sqlite-add-drop-foreign-key-via-table-recreation branch March 16, 2026 07:24
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.

1 participant