up: enables billion of precision on decimal field

main
Washington Botelho 2018-02-06 17:59:42 -02:00
parent 9882309485
commit b3a42bd571
No known key found for this signature in database
GPG Key ID: 5DE4F42A8F073617
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
class CreateRatingTables < ActiveRecord::Migration[5.0]
def change
create_table :rating_rates do |t|
t.decimal :value, default: 0, precision: 17, scale: 14
t.decimal :value, default: 0, precision: 25, scale: 16
t.references :author, index: true, null: false, polymorphic: true
t.references :resource, index: true, null: false, polymorphic: true
@ -17,8 +17,8 @@ class CreateRatingTables < ActiveRecord::Migration[5.0]
unique: true
create_table :rating_ratings do |t|
t.decimal :average, default: 0, mull: false, precision: 17, scale: 14
t.decimal :estimate, default: 0, mull: false, precision: 17, scale: 14
t.decimal :average, default: 0, mull: false, precision: 25, scale: 16
t.decimal :estimate, default: 0, mull: false, precision: 25, scale: 16
t.integer :sum, default: 0, mull: false
t.integer :total, default: 0, mull: false