Module: SchemaPlus::Indexes::RemoveIfExists
- Included in:
- ActiveRecord::ConnectionAdapters::AbstractAdapter, ActiveRecord::ConnectionAdapters::PostgresqlAdapter, ActiveRecord::ConnectionAdapters::Sqlite3Adapter
- Defined in:
- lib/schema_plus/indexes/remove_if_exists.rb
Instance Method Summary collapse
Instance Method Details
#remove_index(table_name, *args) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/schema_plus/indexes/remove_if_exists.rb', line 6 def remove_index(table_name, *args) = args. if_exists = .delete(:if_exists) args << if .any? return if if_exists && !index_name_exists?(table_name, [:name] || index_name(table_name, *args)) super table_name, *args end |