Fixed the management of missing db upgrades

We want to make impossible to apply scripts with a lower version number than the current db version, so that the programmers are forced to rename the scripts.