Refactor price db structure

#475
This commit is contained in:
Artur Beljajev 2017-04-24 01:33:04 +03:00
parent c5d667c711
commit 48135ba72c
6 changed files with 27 additions and 9 deletions

View file

@ -0,0 +1,5 @@
class ChangePricePriceCentsTypeToInteger < ActiveRecord::Migration
def change
change_column :prices, :price_cents, 'integer USING CAST(price_cents AS integer)'
end
end

View file

@ -0,0 +1,5 @@
class RemovePricePriceCurrency < ActiveRecord::Migration
def change
remove_column :prices, :price_currency, :string
end
end

View file

@ -0,0 +1,5 @@
class RemovePricePriceCentsDefault < ActiveRecord::Migration
def change
change_column_default :prices, :price_cents, nil
end
end