mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Be sure to reset PK name renamed in the test
This commit is contained in:
parent
fdd4b73cb8
commit
cf38bda8e2
1 changed files with 3 additions and 0 deletions
|
@ -66,6 +66,9 @@ module ActiveRecord
|
|||
def test_mysql_rename_column_preserves_auto_increment
|
||||
rename_column "test_models", "id", "id_test"
|
||||
assert_equal "auto_increment", connection.columns("test_models").find { |c| c.name == "id_test" }.extra
|
||||
TestModel.reset_column_information
|
||||
ensure
|
||||
rename_column "test_models", "id_test", "id"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue