check¶
Analyze schema differences between your SQLAlchemy models and the live database.
Usage¶
$ dbwarden check --database primary
$ dbwarden check --database primary --force
$ dbwarden check --database primary --out json
Options¶
--database,-d- Target database--out,-o- Output format:txtorjson--force- Allow warning-level changes to pass
Severity model¶
INFO- safe changes like adding a projection or adding a new objectWARNING- risky changes that require--forceERROR- blocked changes such as partition/order key changes
Current behavior¶
DBWarden runs generic safety checks for all backends, covering column type changes, nullability changes, default changes, and table operations. For ClickHouse specifically, additional checks classify changes for:
- added or removed columns
- type changes
- engine changes
- TTL changes
ORDER BYchangesPARTITION BYchanges- materialized view query changes
- projection additions/removals
Notes¶
- warning-level changes exit non-zero unless
--forceis provided - error-level changes remain blocking even with
--force - output is based on live database inspection plus current model metadata