Class: Nandi::Instructions::ChangeColumnDefault

Inherits:
Object
  • Object
show all
Defined in:
lib/nandi/instructions/change_column_default.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table:, column:, value:) ⇒ ChangeColumnDefault

Returns a new instance of ChangeColumnDefault.



8
9
10
11
12
# File 'lib/nandi/instructions/change_column_default.rb', line 8

def initialize(table:, column:, value:)
  @table = table
  @column = column
  @value = value
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



6
7
8
# File 'lib/nandi/instructions/change_column_default.rb', line 6

def column
  @column
end

#tableObject (readonly)

Returns the value of attribute table.



6
7
8
# File 'lib/nandi/instructions/change_column_default.rb', line 6

def table
  @table
end

#valueObject (readonly)

Returns the value of attribute value.



6
7
8
# File 'lib/nandi/instructions/change_column_default.rb', line 6

def value
  @value
end

Instance Method Details

#lockObject



18
19
20
# File 'lib/nandi/instructions/change_column_default.rb', line 18

def lock
  Nandi::Migration::LockWeights::ACCESS_EXCLUSIVE
end

#procedureObject



14
15
16
# File 'lib/nandi/instructions/change_column_default.rb', line 14

def procedure
  :change_column_default
end