Skip to content
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

Disable foreign key checks when removing temp tables #743

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

markstory
Copy link
Member

Attempt to reproduce the problem reported in #741 but added a test that covers the scenario based on current information. Perhaps the problem can be reproduced in CI. There is also a chance that the test suite harness makes this challenging to reproduce because of wrapping transactions.

Attempt to reproduce the problem reported in #741 but added a test that
covers the scenario based on current information. Perhaps the problem
can be reproduced in CI. There is also a chance that the test suite
harness makes this challenging to reproduce because of wrapping
transactions.
@markstory markstory added this to the 4.x (CakePHP 5) milestone Sep 5, 2024
While these foreign key toggles appear to work in tests. When testing
the same migration operations within an application the contraint error
is reproducible and not fixed still.
@markstory markstory marked this pull request as ready for review September 9, 2024 14:30
@markstory
Copy link
Member Author

While the current changes pass, I'm able to reproduce the integrity error problem in an application. A more extensive fix is required to preserve foreign keys on fields as they are currently dropped when the temporary tables are generated.

I'll merge these changes and then start addressing the foreign key preservation issues, and then we can drop foreign keys targetting the subject table and recreate those keys pointing to the new table.

@markstory markstory merged commit 2fb93e5 into 4.x Sep 9, 2024
16 checks passed
@markstory markstory deleted the fix-sqlite-constraint branch September 9, 2024 14: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.

1 participant