summaryrefslogtreecommitdiff
path: root/db/migrate/20230331001256_create_product_reviews.rb
blob: a5fec1a46de99d846c13e89ba0a9215f547be190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class CreateProductReviews < ActiveRecord::Migration[7.0]
  def change
    create_table :product_reviews do |t|
      t.references :user_account, null: false, foreign_key: true
      t.references :product, null: false, foreign_key: true
      t.text :review
      t.integer :rating

      t.timestamps
    end
  end
end