Refactor database version info reading and database updating into
separate functions.