This commit is contained in:
Your Name committed 2026-06-13 23:22:40 -04:00
1 parent 310e48fe6a
commit 0d10c7a071
2 files changed
+32 -5

No files matched your search

@@ -0,0 +1,19 @@
-- CreateTable
CREATE TABLE "ProductTranslation" (
"id" SERIAL NOT NULL,
"productId" INTEGER NOT NULL,
"langCode" TEXT NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT,
"details" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "ProductTranslation_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "ProductTranslation_productId_langCode_key" ON "ProductTranslation"("productId", "langCode");
-- AddForeignKey
ALTER TABLE "ProductTranslation" ADD CONSTRAINT "ProductTranslation_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE CASCADE ON UPDATE CASCADE;