From 04577dd7b1f8de53512976c316f4d34a8a07928b Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Wed, 22 Jul 2026 12:15:28 -0700 Subject: [PATCH] =?UTF-8?q?fix(apply-migrations):=20keep=20--list=20read-o?= =?UTF-8?q?nly=20=E2=80=94=20never=20auto-apply=20schema=20migrations=20wh?= =?UTF-8?q?en=20--list=20is=20combined=20with=20--yes/--non-interactive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- src/commands/apply-migrations.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/apply-migrations.ts b/src/commands/apply-migrations.ts index 0afb21a84..a08862b6b 100644 --- a/src/commands/apply-migrations.ts +++ b/src/commands/apply-migrations.ts @@ -419,7 +419,9 @@ export async function runApplyMigrations(args: string[]): Promise { schemaBehind = await resolveSchemaBehind({ schemaVer, latest: LATEST_VERSION, - autoApply: (cli.yes || cli.nonInteractive) && !cli.dryRun, + // --list and --dry-run are read-only surfaces: never mutate schema + // even when combined with --yes/--non-interactive. + autoApply: (cli.yes || cli.nonInteractive) && !cli.dryRun && !cli.list, run: () => runMigrations(eng), }); await eng.disconnect();