Bunch of migration fixes

To get headpin migrate from 1.2 -> 1.3