Added configurable option for db_type