Add extra logging for database upgrades

Refs #1466