Add tests for upgrading databases.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>