-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Fix 6.1 change_column setting datetime precision #48969
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yahonda
reviewed
Aug 17, 2023
4 tasks
This is already the case for add_column and create_table, but change_column was missed
|
skipkayhil
force-pushed
the
hm-fix-change-column-precision
branch
from
August 22, 2023 02:12
77eab53
to
c2f838e
Compare
Would you make a back port pull request for the 7-0-stable branch?
|
skipkayhil
added a commit
to skipkayhil/rails
that referenced
this pull request
Aug 22, 2023
While working on rails#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 that `change_table` works correctly. The issue is that the two migrations created in these tests both have `nil` versions, and so the Migrator only runs the first one. 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 a `change_table` is not behaving as expected so that is fixed as well.
4 tasks
Backported to the 7-0-stable branch via #49006 |
4 tasks
skipkayhil
added a commit
to skipkayhil/rails
that referenced
this pull request
Aug 23, 2023
While working on rails#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 that `change_table` works correctly. The issue is that the two migrations created in these tests both have `nil` versions, and so the Migrator only runs the first one. 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 a `change_table` is not behaving as expected so that is fixed as well. (manually backported to 7-0-stable because it did not apply cleanly)
paulreece
pushed a commit
to paulreece/rails-paulreece
that referenced
this pull request
Aug 26, 2023
While working on rails#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 that `change_table` works correctly. The issue is that the two migrations created in these tests both have `nil` versions, and so the Migrator only runs the first one. 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 a `change_table` is not behaving as expected so that is fixed as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fix #48965
This is already the case for add_column and create_table, but change_column was missed
Additional Information
This needs to be backported to 7.0, but the test change won't backport cleanly because the Migrator signature in the test changed. I'll make a PR for 7-0-stable as well if that would be easier
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]