-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Migrations with custom transactions don't work #1313
Comments
3.5.3 is not the latest 3.5 version :) Let me know if 3.5.5 doesn't work for you, I will reopen this. |
@greg0ire Since 3.5.3. Actual for 3.5.5. |
Reopening, I'm assuming your saying you're reproducing that issue on 3.5.5 |
The PR I worked on solved a discrepancy in the documentation, as the documentation stated that specifying From the looks of your migration, seems you are explicitly controlling the transactions from the migrations, and therefore, using My recommendation, since you are explicitly controlling the transactions, is to not use @greg0ire does my assessment make sense to you? |
I have several migrations, I want to apply all or none. Since v3.5.3, I can't do it. I understand that you made a fix, but you removed the feature that I used. There is a variant: remove |
@agustingomes Oh right I didn't notice that OP indeed used If you have 3 migrations, and the 2nd one is the one with the custom transaction in it, I believed what happened was only the 2nd migration was actually transactional.
With 3.5.2, I think that wasn't actually happening. With 3.5.2, it looks like you would end up with nested transactions, and you can't even do it because marking a migration as non-transactional while using @agustingomes I notice the documentation still mentions |
It would be: no developer should use this in new projects. Here is an example of how we usually do this: https://raw.githubusercontent.com/doctrine/orm/2.14.x/docs/en/reference/yaml-mapping.rst |
Also, it should be removed from 4.0.x, along with the corresponding code. I just merged 3.6.x into 4.0.x in case that was a blocker. |
BC Break Report
Summary
I have a working migration in version 3.5.2:
Command:
php bin/console doctrine:migrations:migrate --all-or-nothing
Previous behavior
The migration is successful with isTransactional() = false.
Current behavior
The migration is failed.
isTransactional() = false:
isTransactional() = true:
Is caused by #1296
UPDATE. As a solution, remove
START TRANSACTION
andCOMMIT
from my migration, use isTransactional() = true.The text was updated successfully, but these errors were encountered: