From dd1d9bed80b2c45af1da4cd9657a79a04dc6b70b Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Mon, 23 Mar 2026 16:14:14 -0700 Subject: [PATCH] fix(server): check MIGRATION_AUTO_APPLY before MIGRATION_PROMPT PAPERCLIP_MIGRATION_PROMPT=never was checked before PAPERCLIP_MIGRATION_AUTO_APPLY=true, causing auto-apply to never trigger when both env vars are set (as in dev:watch). Swap the check order so AUTO_APPLY takes precedence. Co-Authored-By: Claude Opus 4.6 --- server/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/index.ts b/server/src/index.ts index eb0964ee..74665a9e 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -94,8 +94,8 @@ export async function startServer(): Promise { } async function promptApplyMigrations(migrations: string[]): Promise { - if (process.env.PAPERCLIP_MIGRATION_PROMPT === "never") return false; if (process.env.PAPERCLIP_MIGRATION_AUTO_APPLY === "true") return true; + if (process.env.PAPERCLIP_MIGRATION_PROMPT === "never") return false; if (!stdin.isTTY || !stdout.isTTY) return true; const prompt = createInterface({ input: stdin, output: stdout });