-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Allow to disable foreign keys #63
Comments
I just created a PR in doctrine/data-fixtures doctrine/data-fixtures#272. If it is not going to be merged then I will provide a PR for this in AliceDataFixtures. |
@robertfausk maybe a better idea would be to completely ditch the DataFixtures purge and have our own here. As we would disable the foreign key check, it would also be much simpler as there is no need to sort depending of the associations and co. to know what to truncate first, we can just truncate everything. This would also allow us to ditch the WDYT? |
Thinking about this again, it doesn't make much sense as the issue is the order. The order is true irrelevant with a TRUNCATE, but it is still for the DELETE with is the default. |
Coolio! I think its a good approach to have a solution for AliceDataFixtures as long as there is no decision in doctrine/data-fixtures#272. |
From #32, we could add it to the Purge in the
purge()
method to get access to the connection and disable the foreign key checks before running the actual purge.As this may not be the desirable default behaviour, we could add an option in the config passed to the purger factory.
/cc @robertfausk
The text was updated successfully, but these errors were encountered: