rai schema
Schema integrity tools for the RaiSE database and artifact schemas. Use to detect accidental schema drift between branches or after dependency upgrades.
rai schema sum¶
Compute a deterministic checksum of all active schemas (database migrations, Pydantic models, and artifact schemas). The checksum changes if any schema definition changes, enabling drift detection in CI.
| Flag | Short | Description |
|---|---|---|
--format |
-f |
Output format: human, json. Default: human |
--path |
-p |
Project path. Default: current directory |
# Print checksum for current schema state
rai schema sum
# JSON output for CI comparison
rai schema sum --format json
In CI, capture the baseline checksum on the main branch and compare it against the feature branch. A changed checksum means a migration or model change must be reviewed.