migrations: Make revert operation more resilient
Created by: efritz
In dev, where the sg migration undo
command is most useful, we error if there are unknown definitions (from migrations applied on another branch or due to a squash since the last application). This removes that error instead looking only at the set of applied migrations.
Test plan
Unit tests.