Files
got-gaming/prisma/migrations.sqlite.backup/20251210044500_remove_event_status_field/migration.sql

21 lines
764 B
SQL

-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "_Event_new" (
"id" TEXT NOT NULL PRIMARY KEY,
"date" DATETIME NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT NOT NULL,
"type" TEXT NOT NULL,
"room" TEXT,
"time" TEXT,
"maxPlaces" INTEGER,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "_Event_new" ("id", "date", "name", "description", "type", "room", "time", "maxPlaces", "createdAt", "updatedAt") SELECT "id", "date", "name", "description", "type", "room", "time", "maxPlaces", "createdAt", "updatedAt" FROM "Event";
DROP TABLE "Event";
ALTER TABLE "_Event_new" RENAME TO "Event";
CREATE INDEX "Event_date_idx" ON "Event"("date");
PRAGMA foreign_keys=ON;