21 lines
678 B
SQL
21 lines
678 B
SQL
/*
|
|
Warnings:
|
|
|
|
- Added the required column `plaetze` to the `Dienststelle` table without a default value. This is not possible if the table is not empty.
|
|
|
|
*/
|
|
-- RedefineTables
|
|
PRAGMA defer_foreign_keys=ON;
|
|
PRAGMA foreign_keys=OFF;
|
|
CREATE TABLE "new_Dienststelle" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"name" TEXT NOT NULL,
|
|
"plaetze" INTEGER NOT NULL
|
|
);
|
|
INSERT INTO "new_Dienststelle" ("id", "name") SELECT "id", "name" FROM "Dienststelle";
|
|
DROP TABLE "Dienststelle";
|
|
ALTER TABLE "new_Dienststelle" RENAME TO "Dienststelle";
|
|
CREATE UNIQUE INDEX "Dienststelle_name_key" ON "Dienststelle"("name");
|
|
PRAGMA foreign_keys=ON;
|
|
PRAGMA defer_foreign_keys=OFF;
|