Class: Migsupo::Differ::Operations::RemoveColumn
- Inherits:
-
Object
- Object
- Migsupo::Differ::Operations::RemoveColumn
- Defined in:
- lib/migsupo/differ/operations/remove_column.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
- #column_name ⇒ Object
-
#initialize(table_name:, column:) ⇒ RemoveColumn
constructor
A new instance of RemoveColumn.
- #migration_type ⇒ Object
- #reversible? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(table_name:, column:) ⇒ RemoveColumn
Returns a new instance of RemoveColumn.
7 8 9 10 11 |
# File 'lib/migsupo/differ/operations/remove_column.rb', line 7 def initialize(table_name:, column:) @table_name = table_name.to_s @column = column freeze end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
5 6 7 |
# File 'lib/migsupo/differ/operations/remove_column.rb', line 5 def column @column end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
5 6 7 |
# File 'lib/migsupo/differ/operations/remove_column.rb', line 5 def table_name @table_name end |
Instance Method Details
#column_name ⇒ Object
13 14 15 |
# File 'lib/migsupo/differ/operations/remove_column.rb', line 13 def column_name @column.name end |
#migration_type ⇒ Object
17 18 19 |
# File 'lib/migsupo/differ/operations/remove_column.rb', line 17 def migration_type :remove_column end |
#reversible? ⇒ Boolean
21 22 23 |
# File 'lib/migsupo/differ/operations/remove_column.rb', line 21 def reversible? true end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/migsupo/differ/operations/remove_column.rb', line 25 def to_s "remove_column #{table_name}.#{column_name}" end |