Fixes #6038: correct migration script for insertion id
Merge pull request #740 from ncharles/bug_6005/dev/migration_script_correction

Fixes #6038: correct migration script for insertion id