Corrections to db migration stuff