up: enables billion of precision on decimal field
parent
9882309485
commit
b3a42bd571
|
@ -3,7 +3,7 @@
|
||||||
class CreateRatingTables < ActiveRecord::Migration[5.0]
|
class CreateRatingTables < ActiveRecord::Migration[5.0]
|
||||||
def change
|
def change
|
||||||
create_table :rating_rates do |t|
|
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 :author, index: true, null: false, polymorphic: true
|
||||||
t.references :resource, 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
|
unique: true
|
||||||
|
|
||||||
create_table :rating_ratings do |t|
|
create_table :rating_ratings do |t|
|
||||||
t.decimal :average, 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: 17, scale: 14
|
t.decimal :estimate, default: 0, mull: false, precision: 25, scale: 16
|
||||||
t.integer :sum, default: 0, mull: false
|
t.integer :sum, default: 0, mull: false
|
||||||
t.integer :total, default: 0, mull: false
|
t.integer :total, default: 0, mull: false
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue