finalized migration script