Initial commit
This commit is contained in:
15
db/migrate/20190905050444_add_category_transfers.rb
Normal file
15
db/migrate/20190905050444_add_category_transfers.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class AddCategoryTransfers < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
change_column :transfers, :key, :string, limit: 30, null: false
|
||||
remove_column :transfers, :kind if column_exists?(:transfers, :kind)
|
||||
add_column :transfers, :category, :integer, limit: 1, null: false, after: :key
|
||||
rename_column :transfers, :desc, :description if column_exists?(:transfers, :desc)
|
||||
end
|
||||
|
||||
def down
|
||||
change_column :transfers, :key, :integer, null: false
|
||||
remove_column :transfers, :category if column_exists?(:transfers, :category)
|
||||
add_column :transfers, :kind, :string, limit: 30, null: false, after: :key
|
||||
rename_column :transfers, :description, :desc if column_exists?(:transfers, :description)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user