Added test for database upgrade.