Merge pull request #6447 from nabinhait/patch_fix_legacy_migration

Patch fixed for legacy migration