Support Table Foreign Key Constraints in SQLite#945
Merged
parsonsmatt merged 2 commits intoyesodweb:masterfrom Aug 20, 2019
Merged
Support Table Foreign Key Constraints in SQLite#945parsonsmatt merged 2 commits intoyesodweb:masterfrom
parsonsmatt merged 2 commits intoyesodweb:masterfrom
Conversation
Collaborator
|
Code looks good to me.
Can you elaborate? |
Contributor
Author
|
Sure! What I mean is that this migration works fine with this pr but this still fails with Such a migration is accepted by SQLite (actually now that I checked again, SQLites accepts it even without the unique constraint). |
Collaborator
|
Right, thanks. I'm good to accept and merge this as-is then if you want to bump the relevant version numbers and add a changelog entry 😄 |
Collaborator
|
CI is passing, merging and releasing. Thanks! |
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.
This pr adds support for foreign keys, table constraints in SQLite. They can only reference Primary keys of other tables and not Unique keys, since this would require changes in
Quasiand I'm not sure how well this is supported in other dbs. I've tested migrations from existing schemas, which adds new foreign keys to existing Tables and it also works fine.Before submitting your PR, check that you've:
@sincedeclarations to the HaddockAfter submitting your PR: