History DB support

DB support for historyitem