loggerdb: Cleanly handle DB structure changes