Fixes migrations

I was able to test this with one of my local apps and it seem to work just fine.