pdf hochladen und Anmeldungen loeschen
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `pdfdatei` on the `Anmeldung` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Anmeldung" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"anrede" TEXT NOT NULL,
|
||||
"vorname" TEXT NOT NULL,
|
||||
"nachname" TEXT NOT NULL,
|
||||
"geburtsdatum" TEXT NOT NULL,
|
||||
"strasse" TEXT NOT NULL,
|
||||
"hausnummer" TEXT NOT NULL,
|
||||
"ort" TEXT NOT NULL,
|
||||
"plz" TEXT NOT NULL,
|
||||
"telefon" TEXT NOT NULL,
|
||||
"email" TEXT NOT NULL,
|
||||
"schulart" TEXT NOT NULL,
|
||||
"zeitraum" TEXT NOT NULL,
|
||||
"motivation" TEXT NOT NULL,
|
||||
"pdfDatei" TEXT,
|
||||
"wunsch1Id" INTEGER NOT NULL,
|
||||
"wunsch2Id" INTEGER NOT NULL,
|
||||
"wunsch3Id" INTEGER NOT NULL,
|
||||
"timestamp" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT "Anmeldung_wunsch1Id_fkey" FOREIGN KEY ("wunsch1Id") REFERENCES "Dienststelle" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "Anmeldung_wunsch2Id_fkey" FOREIGN KEY ("wunsch2Id") REFERENCES "Dienststelle" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "Anmeldung_wunsch3Id_fkey" FOREIGN KEY ("wunsch3Id") REFERENCES "Dienststelle" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_Anmeldung" ("anrede", "email", "geburtsdatum", "hausnummer", "id", "motivation", "nachname", "ort", "plz", "schulart", "strasse", "telefon", "timestamp", "vorname", "wunsch1Id", "wunsch2Id", "wunsch3Id", "zeitraum") SELECT "anrede", "email", "geburtsdatum", "hausnummer", "id", "motivation", "nachname", "ort", "plz", "schulart", "strasse", "telefon", "timestamp", "vorname", "wunsch1Id", "wunsch2Id", "wunsch3Id", "zeitraum" FROM "Anmeldung";
|
||||
DROP TABLE "Anmeldung";
|
||||
ALTER TABLE "new_Anmeldung" RENAME TO "Anmeldung";
|
||||
CREATE UNIQUE INDEX "Anmeldung_email_key" ON "Anmeldung"("email");
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
Reference in New Issue
Block a user