Increase account_balance precision (closes foodcoops/foodsoft#322)

This commit is contained in:
wvengen 2014-12-11 22:11:17 +01:00
parent 12bf2198e5
commit 8e4f3a4caf
2 changed files with 20 additions and 11 deletions

View file

@ -0,0 +1,9 @@
class IncreaseAccountBalancePrecision < ActiveRecord::Migration
def up
change_column :groups, :account_balance, :decimal, precision: 12, scale: 2
end
def down
change_column :groups, :account_balance, :decimal, precision: 8, scale: 2
end
end

View file

@ -125,7 +125,7 @@ ActiveRecord::Schema.define(version: 20140921104907) do
t.string "type", default: "", null: false
t.string "name", default: "", null: false
t.string "description"
t.decimal "account_balance", precision: 8, scale: 2, default: 0, null: false
t.decimal "account_balance", precision: 12, scale: 2, default: 0, null: false
t.datetime "created_on", null: false
t.boolean "role_admin", default: false, null: false
t.boolean "role_suppliers", default: false, null: false