fix for #711 - enhance entity id creation migration
fix creation of entity ids in migration
Merge pull request #733 from flapjack/710_cli_maint_entity_ids

1.x improve entity id migration fixes #710