# X_DB_SCHEMA_UNMIGRATED

## Means

an entity declaration no migration recorded

## Typical cause

the half `X_DB_DRIFT` cannot see: that check compares a schema-source **hash** and never reads the SQL, so a committed migration smaller than its declaration passes. Measured on `dummy/social-media-clone`, whose `drift` was GREEN while nine declared CHECK constraints had never reached any database — a comment body could be whitespace, a like count could go negative, an email needed no `@`. Compares `snapshotOf(describeEntities())` against the newest `.snapshot.json`, so it needs no database connection. Also names a table a channel with params or a live query's `subscribes:` needs `REPLICA IDENTITY FULL` on when no migration recorded it (`As of 2026-10-02`): that need is a realtime declaration, so no entity hash moves when the channel is added

## Fix

`bun run x -- db gen "describe the change"` — the generated migration is additive, one `add constraint` per finding

[Entity and database](/error-codes#entity-and-database)
