Drift detection
Your repo says what the schema should be. The live database is what it actually is. When those two diverge — a hotfix run by hand, a column added out of band — the next migration reasons about a schema that no longer exists. Drift detection catches that.
On demand today
Drift detection runs on request against a database you point it at — it is not yet part of the automatic per-PR check. Wiring it into the PR flow is on the roadmap.
What it compares
Sieve introspects the live database and diffs it against the schema snapshot the repo declares. It reports tables, columns, and constraints that exist in one but not the other, plus mismatched types and missing primary keys.
What it ignores
- Framework-internal tables (e.g. the migration history table) are skipped.
- Logical relation fields that have no physical column are not reported as missing.
- Primary keys aren't mistaken for unique-constraint drift.
Why it matters
A migration reviewed against the repo can still be unsafe against the real database if the two have drifted. Surfacing drift turns a silent assumption into a visible one — before the change runs.