migradiff v1.2.0 — the maintained migra fork now has destructive DDL safety rails
Quick update on the migradiff fork (maintained continuation of
the deprecated djrobstep/migra).
v1.2.0 is out: pip install --upgrade migradiff
The headline feature: --safe mode is now on by default. If a
generated migration contains DROP TABLE, DROP COLUMN, or other
destructive operations, the tool halts with exit code 1 and
tells you exactly what it found. Use --force-destructive to
proceed when you're sure.
Also added smart column rename detection — when a DROP COLUMN
and ADD COLUMN of the same type appear on the same table,
migradiff asks if you meant to rename it instead. Saves a lot
of accidental data loss.
Other additions: enum evolution diffing (ADD VALUE for safe
additions, DROP+recreate for removals), domain diffing, and
the codebase now has zero flake8 warnings for the first time.
Full changelog: https://github.com/migradiff/migra/blob/main/CHANGELOG.md