Files
2026-03-09 20:40:53 +01:00

21 lines
628 B
SQL

/*
Warnings:
- You are about to drop the column `attachedFile` on the `FoundEvents` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "FoundEvents" DROP COLUMN "attachedFile";
-- CreateTable
CREATE TABLE "FoundEventAttachments" (
"id" UUID NOT NULL DEFAULT uuidv7(),
"url" VARCHAR NOT NULL,
"eventId" UUID NOT NULL,
CONSTRAINT "FoundEventAttachments_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "FoundEventAttachments" ADD CONSTRAINT "FoundEventAttachments_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES "FoundEvents"("id") ON DELETE RESTRICT ON UPDATE CASCADE;