[DEV-1965] Fix migration script.