replaced PHP migration script with the current one from mantis2 branch