# X_MIGRATION_DESTRUCTIVE

## Means

this migration destroys data and does not say so

## Typical cause

`As of 2026-08`: a committed migration whose `up` drops a table, drops a column, truncates or retypes, with no `-- destructive: true` line in the file. Raised by `x verify`'s `drift` step over the files, never by the migrator — the rail fails in CI, before a release phase applies it. Only `up` is judged: reversing a `create table` is a `drop table`, and marking every `down` marks nothing

## Fix

add the line `-- destructive: true` to the migration, or `x db gen "<name>" --allow-destructive` to regenerate it — the generator writes the marker itself. Add it **before** the migration is applied: the marker is SQL the checksum covers, so marking an applied file is an edit and answers `X_MIGRATION_CONFLICT`

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