Closed hackthetunnelsbot[bot] closed 1 year ago
!review
first time using prisma i'm not sure if i did this correctly please help me out if there are any errors. thanks.
!complete
add-404-page: 2 add-css-animation: 5 add-footer-component: 2 add-login-page-form: 3 add-navbar-component: 3 add-partial-dark-mode: 3 hello-client: 1 hello-service: 1 improve-product-preview-card-component: 2 style-page-component: 2 update-favicon: 1 update-page-title: 1
!approve
Error: You don't have permissions to do that. Please check with @AngelOnFira
!complete
add-404-page: 2 add-css-animation: 5 add-footer-component: 2 add-login-page-form: 3 add-navbar-component: 3 add-partial-dark-mode: 3 hello-client: 1 hello-service: 1 improve-product-preview-card-component: 2 style-page-component: 2 update-favicon: 1 update-page-title: 1
!approve
Approved by @AngelOnFira
This challenge unlocked the following challenges:
!complete
add-404-page: 2 add-css-animation: 5 add-footer-component: 2 add-login-page-form: 3 add-navbar-component: 3 add-partial-dark-mode: 3 add-reviews-table: 3 hello-client: 1 hello-service: 1 improve-product-preview-card-component: 2 responsive-home-page-products: 2 style-page-component: 2 update-favicon: 1 update-page-title: 1
Description:
Create a new
reviews
table. Thereviews
table will store product reviews and therefore should have abelongs to
association with theproducts
table.This table should have two columns,
text
andrating
where rating is an integer.Create this new table via a migration. You can create a new migration by running
npx prisma migrate dev --name {your-migration-name-here}
. See this guide.Acceptance Criteria:
The prisma schema should now include a
reviews
table and is associated with the products table.There should also be a new migration that applies this change to the database.