Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Consider foreign key table constraints when sorting initialization statements #5325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

TheMrMilchmann
Copy link
Contributor

@TheMrMilchmann TheMrMilchmann commented Jul 1, 2024

Currently, foreign key constraints on the "table level" are not considered when sorting the initialization statements. This PR fixes this.

This is especially annoying because the current behavior does not play nicely with composite foreign keys.

@TheMrMilchmann TheMrMilchmann force-pushed the tmm/foreign-key-constraints-creation-order branch from 4dcda7d to 8328695 Compare July 2, 2024 08:41
@JakeWharton JakeWharton merged commit 6060eed into sqldelight:master Jul 2, 2024
11 checks passed
@JakeWharton
Copy link
Collaborator

Thanks! Any idea if there is an issue for this? I did a quick look and didn't see one, but we have a lot...

@TheMrMilchmann
Copy link
Contributor Author

When searching if this is known, I found #2742 which is very old and already closed after providing a workaround, but related nonetheless. Apart from that, I saw no issues about this problem specifically.

@TheMrMilchmann TheMrMilchmann deleted the tmm/foreign-key-constraints-creation-order branch July 2, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants