Fixed upgrade of all versions down to v54

Still hackish though, as the autoAddDoseEvent related
code is now duplicated in all convertToCurrentDatabaseFormat()
functions.