Use decimal to store number of billed/received units

This commit is contained in:
Patrick Gansterer 2021-03-07 13:06:54 +01:00
parent 79fdb4dafb
commit 1798aad5e2
2 changed files with 13 additions and 2 deletions

View file

@ -0,0 +1,11 @@
class ChangeOrderArticleResultTypes < ActiveRecord::Migration[4.2]
def self.up
change_column :order_articles, :units_billed, :decimal, precision: 8, scale: 3
change_column :order_articles, :units_received, :decimal, precision: 8, scale: 3
end
def self.down
change_column :order_articles, :units_billed, :integer
change_column :order_articles, :units_received, :integer
end
end