pdf erforderlich, decrement wenn Dienstelle zugewiesen wurde
This commit is contained in:
14
prisma/migrations/20250726135031_on_delete/migration.sql
Normal file
14
prisma/migrations/20250726135031_on_delete/migration.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_PdfDatei" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"pfad" TEXT NOT NULL,
|
||||
"anmeldungId" INTEGER NOT NULL,
|
||||
CONSTRAINT "PdfDatei_anmeldungId_fkey" FOREIGN KEY ("anmeldungId") REFERENCES "anmeldungen" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_PdfDatei" ("anmeldungId", "id", "pfad") SELECT "anmeldungId", "id", "pfad" FROM "PdfDatei";
|
||||
DROP TABLE "PdfDatei";
|
||||
ALTER TABLE "new_PdfDatei" RENAME TO "PdfDatei";
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
Reference in New Issue
Block a user