mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-31 04:07:52 +00:00
fix(apply-migrations): keep --list read-only — never auto-apply schema migrations when --list is combined with --yes/--non-interactive
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2bfbb4104d
commit
04577dd7b1
@@ -419,7 +419,9 @@ export async function runApplyMigrations(args: string[]): Promise<void> {
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user