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

Fix MigrationHelper::dropAllForeignKeysToTable #2897

Merged
merged 1 commit into from
May 25, 2018
Merged

Fix MigrationHelper::dropAllForeignKeysToTable #2897

merged 1 commit into from
May 25, 2018

Conversation

ackwell
Copy link

@ackwell ackwell commented May 17, 2018

Seems like dropAllForeignKeysToTable was silently failing, which was causing some fails in dropTable due to FK constraints.

The extra updateType and deleteType columns weren't being excluded from the column list, and it seems like it was collecting all the columns, across both FKs and tables, while trying to remove them.

Noticed there's already a helper to cull out the non-column data from a FK array, so I've just swapped that into place.

@brandonkelly
Copy link
Member

MigrationHelper is a little complex. Can you send us a database and test code that demonstrates the issue? support@craftcms.com

@ackwell
Copy link
Author

ackwell commented May 22, 2018

Thanks for taking a look, should be a mail landing shortly.

@angrybrad angrybrad merged commit 441993f into craftcms:develop May 25, 2018
@angrybrad
Copy link
Member

Looks legit to me... thank you!

@ackwell ackwell deleted the patch-1 branch May 26, 2018 10:25
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.

3 participants