v2
这个提交包含在:
@ -0,0 +1,31 @@
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_ChatSession" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"userId" TEXT NOT NULL,
|
||||
"title" TEXT NOT NULL DEFAULT '新会话',
|
||||
"providerId" TEXT,
|
||||
"presetId" TEXT,
|
||||
"pinned" BOOLEAN NOT NULL DEFAULT false,
|
||||
"archived" BOOLEAN NOT NULL DEFAULT false,
|
||||
"totalCost" REAL NOT NULL DEFAULT 0,
|
||||
"enabledSkillIds" TEXT,
|
||||
"enabledToolIds" TEXT,
|
||||
"enabledBuiltInTools" TEXT,
|
||||
"enabledHttpTools" TEXT,
|
||||
"draft" TEXT,
|
||||
"compressEnabled" BOOLEAN NOT NULL DEFAULT true,
|
||||
"compressTrigger" REAL NOT NULL DEFAULT 0.2,
|
||||
"keepRounds" INTEGER NOT NULL DEFAULT 3,
|
||||
"thinkingEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"markdownEnabled" BOOLEAN NOT NULL DEFAULT true,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "ChatSession_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_ChatSession" ("archived", "compressEnabled", "compressTrigger", "createdAt", "draft", "enabledBuiltInTools", "enabledHttpTools", "enabledSkillIds", "enabledToolIds", "id", "keepRounds", "pinned", "presetId", "providerId", "thinkingEnabled", "title", "totalCost", "updatedAt", "userId") SELECT "archived", "compressEnabled", "compressTrigger", "createdAt", "draft", "enabledBuiltInTools", "enabledHttpTools", "enabledSkillIds", "enabledToolIds", "id", "keepRounds", "pinned", "presetId", "providerId", "thinkingEnabled", "title", "totalCost", "updatedAt", "userId" FROM "ChatSession";
|
||||
DROP TABLE "ChatSession";
|
||||
ALTER TABLE "new_ChatSession" RENAME TO "ChatSession";
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
在新工单中引用
屏蔽一个用户