instead of just storing the "head" version in the mp_version table, start recording each migration that's been run.
Update mp to calculate "head" by max(version).
Update mp, before running migrations (up or down), do a consistency check. This means making sure that all migrations from the first to the "head" [ie max(version)] available in migrations/* have actually been run prior to doing any migrations. If not, spit out a warning showing which migrations haven't run, suggesting to resequence them.
Update up to insert version.
Update down to remove version.
Update clean to remove all versions.