Files
pleroma-ollama-bot/prisma/migrations/20250629161333_use_lastrespondedto_rather_than_createdat/migration.sql
2025-06-29 15:03:00 -04:00

21 lines
600 B
SQL

/*
Warnings:
- You are about to drop the column `receivedAt` on the `User` table. All the data in the column will be lost.
*/
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"userFqn" TEXT NOT NULL,
"lastRespondedTo" DATETIME
);
INSERT INTO "new_User" ("id", "userFqn") SELECT "id", "userFqn" FROM "User";
DROP TABLE "User";
ALTER TABLE "new_User" RENAME TO "User";
CREATE UNIQUE INDEX "User_userFqn_key" ON "User"("userFqn");
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;