Public repository: timo / mitch

Reader

A migration stitcher (therefore mitch) for PostgreSQL, SQLite, MariaDB, and others

mitch / docs / adr / runner / two-hashes-detect-modified-migrations.md · 530 bytes · at 76a2c3d332a1 · raw


status: accepted

Modification is detected with a raw and a normalized hash

For every applied migration the deployment stores two hashes of the up script: one of the raw file and one of the SQL after normalizing whitespace, comments and keyword case. A migration counts as modified only when both differ. This lets developers reformat or comment a script without it being treated as a change that needs a redeploy, while still catching real edits. The stored hashes are refreshed silently when only one of them changed.