Skip to content

Configuration

Configuration is resolved in priority order (highest first):

  1. CLI flags--connection-string, --dir, --schema, etc.
  2. Config fileschema-flow.config.yaml
  3. Environment variablesSCHEMA_FLOW_DATABASE_URL, then DATABASE_URL
  4. Convention defaults./schema directory, public schema

Optional schema-flow.config.yaml at project root:

default:
connectionString: ${DATABASE_URL}
pgSchema: public
lockTimeout: 5000
statementTimeout: 30000
environments:
staging:
connectionString: ${STAGING_DATABASE_URL}
production:
connectionString: ${PRODUCTION_DATABASE_URL}
lockTimeout: 3000
statementTimeout: 60000
  • ${VAR} syntax interpolates environment variables
  • --env production selects an environment
  • default section applies to all environments; environment-specific values override
OptionCLI flagDefaultDescription
connectionString--connection-string, --dbenv varsPostgreSQL connection string
baseDir--dir./schemaRoot schema directory
pgSchema--schemapublicTarget PostgreSQL schema
dryRun--dry-runfalsePlan only, don’t execute
allowDestructive--allow-destructivefalseAllow drops and destructive changes
skipChecks--skip-checksfalseSkip pre-migration checks
lockTimeout--lock-timeout5000 (ms)Lock acquisition timeout
statementTimeout--statement-timeout30000 (ms)Statement execution timeout
maxRetries--max-retries3Max retries on transient errors
historyTablehistoryMigration tracking table (in _smplcty_schema_flow schema)
verbose--verbosefalseVerbose output
quiet--quietfalseSuppress non-error output
json--jsonfalseJSON output