Skip to content

Global flags

All commands accept these flags:

FlagDescription
--connection-string <url>PostgreSQL connection string
--db <url>Alias for --connection-string
--dir <path>Root schema directory (default: ./schema)
--schema <name>Target PostgreSQL schema (default: public)
--env <name>Config file environment to use
--allow-destructiveAllow drops and destructive changes
--dry-runPlan only, don’t execute
--skip-checksSkip pre-migration checks
--lock-timeout <ms>Lock acquisition timeout (default: 5000)
--statement-timeout <ms>Statement execution timeout (default: 30000)
--max-retries <n>Max retries on transient errors (default: 3)
--verboseVerbose output
--quietSuppress non-error output
--jsonOutput in JSON format
--versionShow version
--helpShow help
Terminal window
# Use a specific database
npx @smplcty/schema-flow run --db postgresql://user:pass@localhost:5432/mydb
# Production with longer timeouts
npx @smplcty/schema-flow run --env production --lock-timeout 3000 --statement-timeout 60000
# Allow dropping columns/tables
npx @smplcty/schema-flow run --allow-destructive
# Preview changes in JSON format
npx @smplcty/schema-flow plan --json
# Quiet mode for CI
npx @smplcty/schema-flow run --quiet