Method: ActiveRecord::ConnectionAdapters::TableDefinition#index
- Defined in:
- activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
#index(column_name, **options) ⇒ Object
Adds index options to the indexes hash, keyed by column name This is primarily used to track indexes that need to be created after the table
index(:account_id, name: 'index_projects_on_account_id')
517 518 519 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 517 def index(column_name, **) indexes << [column_name, ] end |