aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-11-28 23:50:49 -0800
committerYves Senn <yves.senn@gmail.com>2013-11-28 23:50:49 -0800
commitb782731ce345d94d0929f284ea0c025005798380 (patch)
tree12e97f6650f8090e2ffe7075e0766930c85a54bd /activerecord/lib/active_record/connection_adapters
parent948c0ff1647eb3dd1b45add0d1748d393cd2fd50 (diff)
parent664c7bb361fa5dc5f8596256e714fae5b0f8b19a (diff)
downloadrails-b782731ce345d94d0929f284ea0c025005798380.tar.gz
rails-b782731ce345d94d0929f284ea0c025005798380.tar.bz2
rails-b782731ce345d94d0929f284ea0c025005798380.zip
Merge pull request #13093 from ccutrer/fix-mysql-version-check
fix mysql version check in rename_index
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb2
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