Test for db upgrade is now more general
Updated version