Fixes #5064 moves db_upgrade() back to upgrade lib