5.7.1 migration script