Add db_index to key field in history_entry