Class: Nandi::Instructions::RemoveIndex
- Inherits:
-
Object
- Object
- Nandi::Instructions::RemoveIndex
- Defined in:
- lib/nandi/instructions/remove_index.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #extra_args ⇒ Object
-
#initialize(table:, field:) ⇒ RemoveIndex
constructor
A new instance of RemoveIndex.
- #lock ⇒ Object
- #procedure ⇒ Object
Constructor Details
#initialize(table:, field:) ⇒ RemoveIndex
Returns a new instance of RemoveIndex.
6 7 8 9 |
# File 'lib/nandi/instructions/remove_index.rb', line 6 def initialize(table:, field:) @table = table @field = field end |
Instance Attribute Details
#table ⇒ Object (readonly)
Returns the value of attribute table.
27 28 29 |
# File 'lib/nandi/instructions/remove_index.rb', line 27 def table @table end |
Instance Method Details
#extra_args ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/nandi/instructions/remove_index.rb', line 15 def extra_args if field.is_a?(Hash) field.merge(algorithm: :concurrently) else { column: columns, algorithm: :concurrently } end end |
#lock ⇒ Object
23 24 25 |
# File 'lib/nandi/instructions/remove_index.rb', line 23 def lock Nandi::Migration::LockWeights::SHARE end |
#procedure ⇒ Object
11 12 13 |
# File 'lib/nandi/instructions/remove_index.rb', line 11 def procedure :remove_index end |