Corrected migration script