Flowdock
remove_index(table_name, options = {}) public

Removes the given index from the table.

Removes the index on branch_id in the accounts table if exactly one such index exists.

remove_index :accounts, :branch_id

Removes the index on branch_id in the accounts table if exactly one such index exists.

remove_index :accounts, column: :branch_id

Removes the index on branch_id and party_id in the accounts table if exactly one such index exists.

remove_index :accounts, column: [:branch_id, :party_id]

Removes the index named by_branch_party in the accounts table.

remove_index :accounts, name: :by_branch_party

Removes the index named by_branch_party in the accounts table concurrently.

remove_index :accounts, name: :by_branch_party, algorithm: :concurrently

Note: only supported by PostgreSQL.

Concurrently removing an index is not supported in a transaction.

For more information see the {“Transactional Migrations” section}[rdoc-ref:Migration].

Show source
Register or log in to add new notes.