Plugins compatibility.

some changes to how we do migrations so that plugins can offer a migration cleanly

as far as I have been able to determine, backwards compatible with existing migration functionality