From 8ec919e91336a51c2a7af9922424bbcf6d7643fe Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 30 Mar 2023 18:15:02 -0600 Subject: AƱade modelo ProductReview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20230331001256_create_product_reviews.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrate/20230331001256_create_product_reviews.rb (limited to 'db/migrate/20230331001256_create_product_reviews.rb') diff --git a/db/migrate/20230331001256_create_product_reviews.rb b/db/migrate/20230331001256_create_product_reviews.rb new file mode 100644 index 0000000..a5fec1a --- /dev/null +++ b/db/migrate/20230331001256_create_product_reviews.rb @@ -0,0 +1,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 -- cgit v1.2.3