From e98138c06d7536531c6f2989bcabfb7b15bd76ed Mon Sep 17 00:00:00 2001 From: Willie Zutz Date: Thu, 17 Jul 2025 00:00:52 -0600 Subject: [PATCH] feat(database): ensure system_prompts table creation is conditional; update journal and snapshot files --- drizzle/0001_tricky_thor.sql | 2 +- drizzle/meta/0001_snapshot.json | 2 +- drizzle/meta/_journal.json | 2 +- src/app/api/config/route.ts | 5 +---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drizzle/0001_tricky_thor.sql b/drizzle/0001_tricky_thor.sql index 327d801..4f1f92a 100644 --- a/drizzle/0001_tricky_thor.sql +++ b/drizzle/0001_tricky_thor.sql @@ -1,4 +1,4 @@ -CREATE TABLE `system_prompts` ( +CREATE TABLE IF NOT EXISTS `system_prompts` ( `id` text PRIMARY KEY NOT NULL, `name` text NOT NULL, `content` text NOT NULL, diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json index 9b4a407..b1edfa0 100644 --- a/drizzle/meta/0001_snapshot.json +++ b/drizzle/meta/0001_snapshot.json @@ -166,4 +166,4 @@ "internal": { "indexes": {} } -} \ No newline at end of file +} diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 33ba7ea..7242503 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -17,4 +17,4 @@ "breakpoints": true } ] -} \ No newline at end of file +} diff --git a/src/app/api/config/route.ts b/src/app/api/config/route.ts index 1fd5954..989be63 100644 --- a/src/app/api/config/route.ts +++ b/src/app/api/config/route.ts @@ -135,10 +135,7 @@ export const POST = async (req: Request) => { ), }, AIMLAPI: { - API_KEY: getUpdatedProtectedValue( - config.aimlApiKey, - getAimlApiKey(), - ), + API_KEY: getUpdatedProtectedValue(config.aimlApiKey, getAimlApiKey()), }, LM_STUDIO: { API_URL: config.lmStudioApiUrl,