Increase account_balance precision (closes foodcoops/foodsoft#322)
This commit is contained in:
parent
12bf2198e5
commit
8e4f3a4caf
2 changed files with 20 additions and 11 deletions
|
@ -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
|
22
db/schema.rb
22
db/schema.rb
|
@ -122,23 +122,23 @@ ActiveRecord::Schema.define(version: 20140921104907) do
|
||||||
add_index "group_orders", ["ordergroup_id"], name: "index_group_orders_on_ordergroup_id", using: :btree
|
add_index "group_orders", ["ordergroup_id"], name: "index_group_orders_on_ordergroup_id", using: :btree
|
||||||
|
|
||||||
create_table "groups", force: true do |t|
|
create_table "groups", force: true do |t|
|
||||||
t.string "type", default: "", null: false
|
t.string "type", default: "", null: false
|
||||||
t.string "name", default: "", null: false
|
t.string "name", default: "", null: false
|
||||||
t.string "description"
|
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.datetime "created_on", null: false
|
||||||
t.boolean "role_admin", default: false, null: false
|
t.boolean "role_admin", default: false, null: false
|
||||||
t.boolean "role_suppliers", default: false, null: false
|
t.boolean "role_suppliers", default: false, null: false
|
||||||
t.boolean "role_article_meta", default: false, null: false
|
t.boolean "role_article_meta", default: false, null: false
|
||||||
t.boolean "role_finance", default: false, null: false
|
t.boolean "role_finance", default: false, null: false
|
||||||
t.boolean "role_orders", default: false, null: false
|
t.boolean "role_orders", default: false, null: false
|
||||||
t.datetime "deleted_at"
|
t.datetime "deleted_at"
|
||||||
t.string "contact_person"
|
t.string "contact_person"
|
||||||
t.string "contact_phone"
|
t.string "contact_phone"
|
||||||
t.string "contact_address"
|
t.string "contact_address"
|
||||||
t.text "stats"
|
t.text "stats"
|
||||||
t.integer "next_weekly_tasks_number", default: 8
|
t.integer "next_weekly_tasks_number", default: 8
|
||||||
t.boolean "ignore_apple_restriction", default: false
|
t.boolean "ignore_apple_restriction", default: false
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "groups", ["name"], name: "index_groups_on_name", unique: true, using: :btree
|
add_index "groups", ["name"], name: "index_groups_on_name", unique: true, using: :btree
|
||||||
|
|
Loading…
Reference in a new issue