class Nandi::Instructions::RemoveIndex
Attributes
field[R]
table[R]
Public Class Methods
new(table:, field:)
click to toggle source
# File lib/nandi/instructions/remove_index.rb, line 6 def initialize(table:, field:) @table = table @field = field end
Public Instance Methods
extra_args()
click to toggle source
# 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()
click to toggle source
# File lib/nandi/instructions/remove_index.rb, line 23 def lock Nandi::Migration::LockWeights::SHARE end
procedure()
click to toggle source
# File lib/nandi/instructions/remove_index.rb, line 11 def procedure :remove_index end
Private Instance Methods
columns()
click to toggle source
# File lib/nandi/instructions/remove_index.rb, line 33 def columns columns = Array(field) columns = columns.first if columns.one? columns end