Module: SchemaPlus::Indexes::ActiveRecord::Migration::CommandRecorder
- Defined in:
- lib/schema_plus/indexes/active_record/migration/command_recorder.rb
Instance Method Summary collapse
-
#invert_add_index(args) ⇒ Object
inversion of add_index will be remove_index.
Instance Method Details
#invert_add_index(args) ⇒ Object
inversion of add_index will be remove_index. add if_exists option for cases where the index doesn't actually exist
10 11 12 13 14 15 |
# File 'lib/schema_plus/indexes/active_record/migration/command_recorder.rb', line 10 def invert_add_index(args) super.tap { |(_, args)| = args[-1] [:if_exists] = true } end |