method
enable_index
v8.1.1 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::MySQL::Table
enable_index(index_name)public
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.
See {connection.enable_index}[rdoc-ref:SchemaStatements#enable_index]