SONAR-5007 fix db migrations 538 and 539
SONAR-5007 add test (to be fixed and enabled soon)