Migration stuff

Fixed up the migs so they can deploy properly. Probably a bit of
tweaking left.