Log upgrade events to a sqlite database file