fix migration of database