main
Washington Botelho 2022-05-18 10:11:50 -03:00
parent 277c0c08f3
commit 0944c5135b
2 changed files with 4 additions and 4 deletions

View File

@ -5,8 +5,8 @@ class CreateRatingTable < ActiveRecord::Migration[7.0]
create_table :rating_ratings do |t| create_table :rating_ratings do |t|
t.decimal :average, default: 0, mull: false, precision: 25, scale: 16 t.decimal :average, default: 0, mull: false, precision: 25, scale: 16
t.decimal :estimate, default: 0, mull: false, precision: 25, scale: 16 t.decimal :estimate, default: 0, mull: false, precision: 25, scale: 16
t.bigint :sum, default: 0, mull: false t.bigint :sum, default: 0, mull: false
t.bigint :total, default: 0, mull: false t.bigint :total, default: 0, mull: false
t.references :resource, index: true, null: false, polymorphic: true t.references :resource, index: true, null: false, polymorphic: true
t.references :scopeable, index: true, null: true, polymorphic: true t.references :scopeable, index: true, null: true, polymorphic: true

View File

@ -5,8 +5,8 @@ class CreateReviewRatingsTable < ActiveRecord::Migration[7.0]
create_table :review_ratings do |t| create_table :review_ratings do |t|
t.decimal :average, default: 0, mull: false, precision: 25, scale: 16 t.decimal :average, default: 0, mull: false, precision: 25, scale: 16
t.decimal :estimate, default: 0, mull: false, precision: 25, scale: 16 t.decimal :estimate, default: 0, mull: false, precision: 25, scale: 16
t.bigint :sum, default: 0, mull: false t.bigint :sum, default: 0, mull: false
t.bigint :total, default: 0, mull: false t.bigint :total, default: 0, mull: false
t.references :resource, index: true, null: false, polymorphic: true t.references :resource, index: true, null: false, polymorphic: true
t.references :scopeable, index: true, null: true, polymorphic: true t.references :scopeable, index: true, null: true, polymorphic: true