remove_index
- 1.0.0 (0)
- 1.1.6 (18)
- 1.2.6 (-7)
- 2.0.3 (0)
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (-2)
- 3.1.0 (2)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (2)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (6)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (38)
- 6.1.3.1 (32)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- 7.2.3 (0)
- 8.0.0 (0)
- 8.1.1 (0)
- What's this?
remove_index(table_name, column_name = nil, **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 on branch_id named by_branch_party in the accounts table.
remove_index :accounts, :branch_id, name: :by_branch_party
Checks if the index exists before trying to remove it. Will silently ignore indexes that don’t exist.
remove_index :accounts, if_exists: true
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].

