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 FK checks also on DELETE #121

Merged
merged 7 commits into from
Sep 2, 2019

Conversation

tifabien
Copy link
Contributor

Actually I'm facing the same issue with the DELETE purge mode. I got the following error when trying to refresh my database.

In AbstractMySQLDriver.php line 49:

An exception occurred while executing 'DELETE FROM portal':

SQLSTATE[23000]: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails

@theofidry
Copy link
Owner

Thanks for the PR!

  • Would it be possible to make sure the CI is green before that? It seems to be failing due to a deprecation error message which could be fixed beforehand
  • Any chance to get a test for it? IIRC there is one already partially implemented for it

@tifabien
Copy link
Contributor Author

tifabien commented Aug 5, 2019

  • Would it be possible to make sure the CI is green before that? It seems to be failing due to a deprecation error message which could be fixed beforehand

I can try indeed to get the CI to pass. I got one small question because it seems the "weak_vendors" has been deprecated since SF 4.3. How can I do to keep this "weak_vendors" when testing with SF < 4.3 and testing with the new "max[self]=0" when SF 4.3+ is used?

@theofidry
Copy link
Owner

Maybe we can allow a certain number of deprecations instead?

@tifabien
Copy link
Contributor Author

tifabien commented Aug 5, 2019

Do you prefer I remove the SYMFONY_DEPRECATIONS_HELPER env in all phpunit.xml.dist file (as 0 is the default value) or I change the value to 0 instead of weak_vendors

@theofidry
Copy link
Owner

Setting it to 0 looks more explicit to me 👍

@tifabien
Copy link
Contributor Author

tifabien commented Aug 5, 2019

@theofidry I think I'm done now :) CI is now green. I updated values for all SYMFONY_DEPRECATIONS_HELPER env + I updated dependency of proxyManager (the last version supports PHP 7.4)

@theofidry theofidry merged commit a2c2e67 into theofidry:master Sep 2, 2019
@theofidry
Copy link
Owner

Thanks a lot, sorry somehow forgot about that PR :(

@tifabien tifabien deleted the disable-fk-checks branch September 3, 2019 10:26
@tifabien
Copy link
Contributor Author

@theofidry Do you think it's possible to include this PR in a new release or do you have something on the roadmap in the repo?

@theofidry
Copy link
Owner

theofidry commented Oct 14, 2019

There's 242497e I'm not entirely sure of the effects. But ultimately I kinda wanted to have #108 in tbh. The issue with it is I feel it's getting harder and harder to set up the test so it would be nice to be able to switch the DBs to Docker to avoid having to set up local DBs for testing

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.

2 participants