merlyn/server/prisma/migrations/20250506214129_init/migration.sql
Sean Hatfield 10e65fc021
Chat prompt history menu (#3770)
* 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>
2025-05-08 08:29:46 -07:00

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");