* wip system prompt history sidebar ui * lint * backend/frontend implementation for prompt history wip * lint * rework ui * add delete menu and delete chat history by id * lint * ref for menu button * reorganize components + light mode styles * lint * UI refactor * backend refactor * remove unused import * add border-none to all buttons * fix spacing on dots 3 icon button * add window to confirm * add english translations * normalize translations * lin * patch store logic * sticky header --------- Co-authored-by: timothycarambat <rambat1010@gmail.com>
14 lines
636 B
SQL
14 lines
636 B
SQL
-- CreateTable
|
|
CREATE TABLE "prompt_history" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"workspaceId" INTEGER NOT NULL,
|
|
"prompt" TEXT NOT NULL,
|
|
"modifiedBy" INTEGER,
|
|
"modifiedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
CONSTRAINT "prompt_history_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "workspaces" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT "prompt_history_modifiedBy_fkey" FOREIGN KEY ("modifiedBy") REFERENCES "users" ("id") ON DELETE SET NULL ON UPDATE CASCADE
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE INDEX "prompt_history_workspaceId_idx" ON "prompt_history"("workspaceId");
|