instance method
remove_index
Ruby on Rails 3.1.12
Since v2.2.3Signature
remove_index(table_name, options = {})
Remove the given index from the table.
Remove the index_accounts_on_column in the accounts table.
remove_index :accounts, :column
Remove the index named index_accounts_on_branch_id in the accounts table.
remove_index :accounts, :column => :branch_id
Remove the index named index_accounts_on_branch_id_and_party_id in the accounts table.
remove_index :accounts, :column => [:branch_id, :party_id]
Remove the index named by_branch_party in the accounts table.
remove_index :accounts, :name => :by_branch_party
Parameters
-
table_namereq -
optionsopt = {}
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 357
def remove_index(table_name, options = {})
remove_index!(table_name, index_name_for_remove(table_name, options))
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb line 357
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::SchemaStatements