class ActiveRecord::ConnectionAdapters::MySQL::Table
Active Record MySQL Adapter Table¶ ↑
Public Instance Methods
Disables an index not to be used by query optimizers.
t.disable_index(:email)
Note: only supported by MySQL version 8.0.0 and greater, and MariaDB version 10.6.0 and greater.
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 137 def disable_index(index_name) @base.disable_index(name, index_name) end
Enables an index to be used by query optimizers.
t.enable_index(:email)
Note: only supported by MySQL version 8.0.0 and greater, and MariaDB version 10.6.0 and greater.
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 126 def enable_index(index_name) @base.enable_index(name, index_name) end