diff options
author | Akira Matsuda <ronnie@dio.jp> | 2014-08-15 01:27:50 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2014-08-15 01:29:42 +0900 |
commit | cf38bda8e2a16ce205ec88207687b8091ee67617 (patch) | |
tree | 4e21f292716cf41ce3fca810b41f16ca47a4d243 /activerecord/test | |
parent | fdd4b73cb8ddf35c941b96033cab15e5080f54ac (diff) | |
download | rails-cf38bda8e2a16ce205ec88207687b8091ee67617.tar.gz rails-cf38bda8e2a16ce205ec88207687b8091ee67617.tar.bz2 rails-cf38bda8e2a16ce205ec88207687b8091ee67617.zip |
Be sure to reset PK name renamed in the test
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration/columns_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/columns_test.rb b/activerecord/test/cases/migration/columns_test.rb index 4e6d7963aa..e6aa901814 100644 --- a/activerecord/test/cases/migration/columns_test.rb +++ b/activerecord/test/cases/migration/columns_test.rb @@ -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 |