Fixed migration script