Skip to content

Commit

Permalink
feat: prisma model and migration updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Shukazuby committed Feb 11, 2025
1 parent 294835b commit 590b34e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CREATE TABLE "productImages" (
"id" TEXT NOT NULL,
"image_url" TEXT NOT NULL,
"productId" TEXT NOT NULL,
"product_id" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,

Expand All @@ -20,4 +20,4 @@ CREATE TABLE "products" (
);

-- AddForeignKey
ALTER TABLE "productImages" ADD CONSTRAINT "productImages_productId_fkey" FOREIGN KEY ("productId") REFERENCES "products"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE "productImages" ADD CONSTRAINT "productImages_product_id_fkey" FOREIGN KEY ("product_id") REFERENCES "products"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
2 changes: 1 addition & 1 deletion apps/backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ model Product {
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@map("products")
}
}

0 comments on commit 590b34e

Please sign in to comment.