bugfix when migrating against an empty core database