Smartify™ the database update logging.

Signed-off-by: Aron Cedercrantz <aron@cedercrantz.se>