Fixed the migration script 0007

On gemcontrol the upgrade did not work due to temporary UNIQUE constraint violations during the update.