fix(upgrade): no longer try to process upgrade files from before installation version

The unprocessed upgrade files include everything which isn't listed in
the databse. But on a fresh installation nothing is added to the
database. This skipps all files from before the version in the database.

fixes: #7457

todo

- [x] add UnitTest
The test names should describe the expected behavior.

Some examples:
 - ```testUpgradeFinishesDespiteExceptions()```
 - ```testUpgradeFailsIfParamFooIsMissing()```
 - ```testUpgradeFailsIfParamFooIsBar()```
 - etc.

The unit test results will then be much more informative in case of a failing test.