summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20230331001256_create_product_reviews.rb12
1 files changed, 12 insertions, 0 deletions
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