-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Do not use by default transactional DDL when the database engine does not support them #1152
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think people reviewing this should read doctrine/dbal#4481 (comment) first.
I proposed this approach myself in #1104 (comment), so of course I approve 👍
Long term, I think the behavior of this method should be configurable so that users can choose to make it behave like before the change, after the change, or like return false
.
@morozov @stof @ostrolucky please review
As an afterthought: should |
d8a0974
to
049640d
Compare
I think you should revert #1131 too, and yes, I think we should target 2.3.x, because although it was reported on 3.1, It's probably not specific to it. |
049640d
to
23b2dfe
Compare
Base changed to 2.3.x |
@ste93cry please also review :) |
A few thoughts on the current state of the PR:
|
That one doesn't seem to solve the problem with |
I don't think |
This is probably because up until doctrine/dbal#3480 (4.0.x) DBAL didn't consistently convert commit/rollback errors to exceptions. |
I understand here the points by @morozov .
Indeed, that would be a braking change. Another idea is then just to document it very well, with some big red alert. So we move the responsibility on the user. I do not like the idea of suppressing errors...
I did not understand this part....if the user overrides
when we agree on the solution, more documentation or tests can be added. |
Agree, that is part of the long term solution. The other part would be to give them an easy way to do so, because having to add public function isTransactional(): bool
{
return false;
} to every migration is not very practical, unless maybe we automate it. I was proposing to complexify
That's the thing: by default, generations are created without that override. |
I probably should have done this sooner, but I created an RFC to centralize this discussion: #1153 |
For what's worth, I tested it and it looks like the issue is solved, but I still think that exposing the |
Any news here? Issue is quite blocking for everyone that wraps the database platform, in my case |
I have to echo @ste93cry request. This is becoming a severe irritation. |
@ste93cry I know I have positive reviews coming up for #1157 from @goetas when he finds some time That PR contains an explanation that tells the user something you could repeat to yours if that PR does get merged indeed: using MySQL + transactions is risky, and was supported by accident up until now. End users should mark the migrations that use DDL as non-transactional by using a method override, which is not convenient right now but should become more easy in the future. @NeilMasters you probably didn't mean harm with your comment, but be aware that it's quite close to spam, and sure isn't constructive. |
But what's the blocker to merge this PR? 🤔 I have an urge to just press the green button, any objections to that? |
Dismissing my own review since I am no longer sure about this.
I think we should go that way, that's why I created #1157 (in particular, the explanation part). I don't think we should add more band-aids over the band-aid, especially if we decide to remove them later. So the blocker would be a decision by @goetas on what the right course of action is. |
#1157 looks better than this as it achieves something similar but being backward compatible. |
revert #1131 and #1143