Class: DeclareSchema::SchemaChange::TableRename
- Inherits:
-
Base
- Object
- Base
- DeclareSchema::SchemaChange::TableRename
show all
- Defined in:
- lib/declare_schema/schema_change/table_rename.rb
Instance Method Summary
collapse
Methods inherited from Base
#down, format_options, #up
Constructor Details
#initialize(old_name, new_name) ⇒ TableRename
Returns a new instance of TableRename.
8
9
10
11
|
# File 'lib/declare_schema/schema_change/table_rename.rb', line 8
def initialize(old_name, new_name)
@old_name = old_name
@new_name = new_name
end
|
Instance Method Details
#down_command ⇒ Object
17
18
19
|
# File 'lib/declare_schema/schema_change/table_rename.rb', line 17
def down_command
"rename_table #{@new_name.to_sym.inspect}, #{@old_name.to_sym.inspect}"
end
|
#up_command ⇒ Object
13
14
15
|
# File 'lib/declare_schema/schema_change/table_rename.rb', line 13
def up_command
"rename_table #{@old_name.to_sym.inspect}, #{@new_name.to_sym.inspect}"
end
|