summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-30 18:15:02 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-30 18:15:02 -0600
commit8ec919e91336a51c2a7af9922424bbcf6d7643fe (patch)
treecd4d8712dfc5dd73be24216d3689ad643ca84dfd /db/migrate
parent54312e90df7c5a72bba09072f2bbb2c92d77d999 (diff)
Añade modelo ProductReview
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