Fixed the management of missing db upgrades

The "future_version" concept was wrong, since by design it must be possible to apply scripts with a lower version number.