Skip to content

Commit

Permalink
fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
supermomme committed Nov 18, 2024
1 parent 9f29ad9 commit f6adb63
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
-- CreateEnum
CREATE TYPE "FileProvider" AS ENUM ('LOCAL', 'AZURE');

-- CreateTable
CREATE TABLE "UnterveranstaltungDocument" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT,
"unterveranstaltungId" INTEGER NOT NULL,
"fileId" TEXT NOT NULL,

CONSTRAINT "UnterveranstaltungDocument_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "File" (
"id" TEXT NOT NULL,
Expand All @@ -26,15 +15,26 @@ CREATE TABLE "File" (
CONSTRAINT "File_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "UnterveranstaltungDocument_fileId_key" ON "UnterveranstaltungDocument"("fileId");
-- CreateTable
CREATE TABLE "UnterveranstaltungDocument" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT,
"unterveranstaltungId" INTEGER NOT NULL,
"fileId" TEXT NOT NULL,

CONSTRAINT "UnterveranstaltungDocument_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "File_id_key" ON "File"("id");

-- CreateIndex
CREATE UNIQUE INDEX "File_key_key" ON "File"("key");

-- CreateIndex
CREATE UNIQUE INDEX "UnterveranstaltungDocument_fileId_key" ON "UnterveranstaltungDocument"("fileId");

-- AddForeignKey
ALTER TABLE "UnterveranstaltungDocument" ADD CONSTRAINT "UnterveranstaltungDocument_unterveranstaltungId_fkey" FOREIGN KEY ("unterveranstaltungId") REFERENCES "Unterveranstaltung"("id") ON DELETE CASCADE ON UPDATE CASCADE;

Expand Down

0 comments on commit f6adb63

Please sign in to comment.