SONAR-5437 fix bug on postgres (at least) when no data to be upgraded