Fix #1677 : Avoid migration failure
Merge pull request #905 from romainneutron/fix-1677

[3.8] Fix #1677 : Avoid migration failure