-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure unique combination of user_id and product_id in product_review…
…s table to prevent duplicate reviews from the same user for a single product.
- Loading branch information
GitHub Gen Changes
committed
Aug 20, 2024
1 parent
8ef958f
commit aa652ef
Showing
3 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- Modify "product_reviews" table | ||
ALTER TABLE `product_reviews` ADD UNIQUE INDEX `user_product_review` (`user_id`, `product_id`); | ||
Check warning on line 2 in dirs/ecommerce/migrations/20240820130921.sql GitHub Actions / atlasdata dependent changes detected
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters