diff --git a/lib/generators/rating/templates/db/migrate/create_rating_tables.rb b/lib/generators/rating/templates/db/migrate/create_rating_tables.rb index af1ac28..f0edbeb 100644 --- a/lib/generators/rating/templates/db/migrate/create_rating_tables.rb +++ b/lib/generators/rating/templates/db/migrate/create_rating_tables.rb @@ -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