make history_scan_database actually take and return the types passed to underlying database shards.