SONAR-5249 Fix migration script