summaryrefslogtreecommitdiff
path: root/db/schema.rb
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/schema.rb
parent54312e90df7c5a72bba09072f2bbb2c92d77d999 (diff)
Añade modelo ProductReview
Diffstat (limited to 'db/schema.rb')
-rw-r--r--db/schema.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/db/schema.rb b/db/schema.rb
index 11c178a..8506e8d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[7.0].define(version: 2023_03_25_061452) do
+ActiveRecord::Schema[7.0].define(version: 2023_03_31_001256) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -69,6 +69,17 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_25_061452) do
t.datetime "updated_at", null: false
end
+ create_table "product_reviews", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
+ t.bigint "user_account_id", null: false
+ t.bigint "product_id", null: false
+ t.text "review"
+ t.integer "rating"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["product_id"], name: "index_product_reviews_on_product_id"
+ t.index ["user_account_id"], name: "index_product_reviews_on_user_account_id"
+ end
+
create_table "products", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.string "public_id"
t.string "name"
@@ -106,5 +117,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_25_061452) do
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "cards", "user_accounts"
+ add_foreign_key "product_reviews", "products"
+ add_foreign_key "product_reviews", "user_accounts"
add_foreign_key "products", "companies"
end