Class: DeclareSchema::SchemaChange::TableChange
- Inherits:
-
Base
- Object
- Base
- DeclareSchema::SchemaChange::TableChange
show all
- Defined in:
- lib/declare_schema/schema_change/table_change.rb
Instance Method Summary
collapse
Methods inherited from Base
#down, format_options, #up
Constructor Details
#initialize(table_name, old_options, new_options) ⇒ TableChange
Returns a new instance of TableChange.
8
9
10
11
12
|
# File 'lib/declare_schema/schema_change/table_change.rb', line 8
def initialize(table_name, old_options, new_options)
@table_name = table_name
@old_options = old_options
@new_options = new_options
end
|
Instance Method Details
#down_command ⇒ Object
18
19
20
|
# File 'lib/declare_schema/schema_change/table_change.rb', line 18
def down_command
alter_table(@table_name, @old_options)
end
|
#up_command ⇒ Object
14
15
16
|
# File 'lib/declare_schema/schema_change/table_change.rb', line 14
def up_command
alter_table(@table_name, @new_options)
end
|