Fixed an issue with db migration