admin user and ui panel
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "ProductVariant" ADD COLUMN "imageId" TEXT;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "ProductVariant_imageId_idx" ON "ProductVariant"("imageId");
|
||||
|
||||
-- AddForeignKey
|
||||
-- ON DELETE SET NULL: removing a gallery image must never cascade into the
|
||||
-- variant, because OrderItem rows reference variants and losing one would
|
||||
-- break order history. The variant simply loses its picture.
|
||||
ALTER TABLE "ProductVariant" ADD CONSTRAINT "ProductVariant_imageId_fkey" FOREIGN KEY ("imageId") REFERENCES "ProductImage"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user