Fix transaction reverting for migrations#31604
Conversation
|
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @eileencodes (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Looking at the original PR dv goes by "David Verhasselt" in the CHANGELOG so can you update that for consistecy?
Also can you update your commit to add the following so that he gets the commit credit in the contributors app too?
commit message text
[fatkodima & David Verhasselt]
0e84f08 to
d662ee8
Compare
d662ee8 to
638a060
Compare
|
@eileencodes thank you for review. Fixed your notes. |
638a060 to
f124f34
Compare
There was a problem hiding this comment.
Are we able to use #public_send here?
There was a problem hiding this comment.
Unfortunately, no. For example, this method
is private.There was a problem hiding this comment.
You should move these changes to the V5_2 class now that V6_0 is current.
f124f34 to
9c1700f
Compare
[fatkodima & David Verhasselt]
9c1700f to
bdd8d58
Compare
Commands than run inside a
transactionblock in a reverted migration ran uninverted, as is.So, e.g. reverting this a bit contrived migration will fail:
But, intuitively, it should be reverted and table should be removed.
This change fixes that problems with uninverted
transactionblocks.Originates from outdated #22141 and addresses only new migrations.