21 lines
652 B
SQL
21 lines
652 B
SQL
/*
|
|
Warnings:
|
|
|
|
- Added the required column `expiresAt` to the `Room` 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_Room" (
|
|
"id" TEXT NOT NULL PRIMARY KEY,
|
|
"data" TEXT NOT NULL,
|
|
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"expiresAt" DATETIME NOT NULL
|
|
);
|
|
INSERT INTO "new_Room" ("createdAt", "data", "id", "expiresAt") SELECT "createdAt", "data", "id", "createdAt" FROM "Room";
|
|
DROP TABLE "Room";
|
|
ALTER TABLE "new_Room" RENAME TO "Room";
|
|
PRAGMA foreign_keys=ON;
|
|
PRAGMA defer_foreign_keys=OFF;
|