fix database migration