feat: add AI settings routes, storage, UI card, and migration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-05-06 08:58:58 -04:00
parent 8c162d7040
commit 4989201c62
5 changed files with 295 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
CREATE TABLE "ai_settings" (
"id" SERIAL NOT NULL,
"userId" INTEGER NOT NULL,
"apiKey" TEXT NOT NULL,
CONSTRAINT "ai_settings_pkey" PRIMARY KEY ("id")
);
ALTER TABLE "ai_settings" ADD CONSTRAINT "ai_settings_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
CREATE UNIQUE INDEX "ai_settings_userId_key" ON "ai_settings"("userId");