diff options
author | Cody Cutrer <cody@cutrer.us> | 2013-11-28 19:42:11 -0700 |
---|---|---|
committer | Cody Cutrer <cody@cutrer.us> | 2013-11-28 19:42:11 -0700 |
commit | 664c7bb361fa5dc5f8596256e714fae5b0f8b19a (patch) | |
tree | 12e97f6650f8090e2ffe7075e0766930c85a54bd /activerecord/lib | |
parent | 948c0ff1647eb3dd1b45add0d1748d393cd2fd50 (diff) | |
download | rails-664c7bb361fa5dc5f8596256e714fae5b0f8b19a.tar.gz rails-664c7bb361fa5dc5f8596256e714fae5b0f8b19a.tar.bz2 rails-664c7bb361fa5dc5f8596256e714fae5b0f8b19a.zip |
fix mysql version check in rename_index
also clarify native rename_index support is >= 5.7, not > 5.7
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index 3aa4604912..3d3c3ee79b 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -488,7 +488,7 @@ module ActiveRecord end def rename_index(table_name, old_name, new_name) - if version[0] >= 5 && version[1] >= 7 + if (version[0] == 5 && version[1] >= 7) || version[0] >= 6 execute "ALTER TABLE #{quote_table_name(table_name)} RENAME INDEX #{quote_table_name(old_name)} TO #{quote_table_name(new_name)}" else super |