Fix migration to version 3.8
Merge pull request #889 from romainneutron/fix-upgrade

[3.8] Fix migration to version 3.8