fix migration from 3.1
Merge pull request #1042 from moctardiouf/fixmigration

[3.8] fix migration from 3.1