From a3026bf95da0c2a004fa0d320f941eca68b48ad7 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 00:44:16 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`prod`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @Atticus6. * https://github.com/Atticus6/coder/pull/9#issuecomment-3741242539 The following files were modified: * `server/plugins/setup.ts` --- server/plugins/setup.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/plugins/setup.ts b/server/plugins/setup.ts index 7546097..6b4a5ad 100644 --- a/server/plugins/setup.ts +++ b/server/plugins/setup.ts @@ -6,6 +6,12 @@ import { migrate } from "drizzle-orm/postgres-js/migrator"; import { definePlugin } from "nitro"; import postgres from "postgres"; +/** + * Set up the "workflow" database schema and apply Drizzle migrations from the project's drizzle folder. + * + * Ensures the PostgreSQL schema named "workflow" exists, runs migrations using the DATABASE_URL from the environment, + * logs progress, and closes the database connection. On migration failure the process exits with code 1. + */ async function runMigrations() { console.log("🔧 Setting up database schema..."); @@ -46,4 +52,4 @@ export default definePlugin(async () => { } // nitroApp.hooks.hook("request", async () => {}); -}); +}); \ No newline at end of file