-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Log" (
    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "projectId" INTEGER NOT NULL,
    "timestampMilli" BIGINT NOT NULL,
    "contents" TEXT NOT NULL,
    "commit" TEXT,
    "serviceName" TEXT NOT NULL,
    "workerId" TEXT NOT NULL,
    "runId" TEXT NOT NULL,
    CONSTRAINT "Log_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
INSERT INTO "new_Log" ("commit", "contents", "id", "projectId", "runId", "serviceName", "timestampMilli", "workerId") SELECT "commit", "contents", "id", "projectId", "runId", "serviceName", "timestampMilli", "workerId" FROM "Log";
DROP TABLE "Log";
ALTER TABLE "new_Log" RENAME TO "Log";
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;
