add support for database upgrades