Fix 6.1 change_table setting datetime precision #48974
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Background
While working on #48969, I found that some of the Compatibility test cases were not working correctly. The tests removed in this commit were never running the
change_table
migration and so were not actually testing thatchange_table
works correctly. The issue is that the two migrations created in these tests both havenil
versions, and so the Migrator only runs the first one.Detail
This commit refactors the tests so that its easier to test the behavior of each Migration class version (and I think the rest of the tests should be updated to use this strategy as well). Additionally, since the tests are fixed it exposed that
t.change
in achange_table
is not behaving as expected so that is fixed as well.Additional information
This should be backported to
7-0-stable
. Because of the change to the migrator signature it will likely not apply cleanly, I'm happy to make a PR to7-0-stable
if that would make it easier.Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]