Class: Nandi::Instructions::AddColumn
- Inherits:
-
Object
- Object
- Nandi::Instructions::AddColumn
- Defined in:
- lib/nandi/instructions/add_column.rb
Instance Attribute Summary collapse
-
#extra_args ⇒ Object
readonly
Returns the value of attribute extra_args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(table:, name:, type:, **kwargs) ⇒ AddColumn
constructor
A new instance of AddColumn.
- #lock ⇒ Object
- #procedure ⇒ Object
Constructor Details
#initialize(table:, name:, type:, **kwargs) ⇒ AddColumn
8 9 10 11 12 13 |
# File 'lib/nandi/instructions/add_column.rb', line 8 def initialize(table:, name:, type:, **kwargs) @table = table @name = name @type = type @extra_args = kwargs end |
Instance Attribute Details
#extra_args ⇒ Object (readonly)
Returns the value of attribute extra_args.
6 7 8 |
# File 'lib/nandi/instructions/add_column.rb', line 6 def extra_args @extra_args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/nandi/instructions/add_column.rb', line 6 def name @name end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
6 7 8 |
# File 'lib/nandi/instructions/add_column.rb', line 6 def table @table end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/nandi/instructions/add_column.rb', line 6 def type @type end |
Instance Method Details
#lock ⇒ Object
19 20 21 |
# File 'lib/nandi/instructions/add_column.rb', line 19 def lock Nandi::Migration::LockWeights::ACCESS_EXCLUSIVE end |
#procedure ⇒ Object
15 16 17 |
# File 'lib/nandi/instructions/add_column.rb', line 15 def procedure :add_column end |