db: introduce db_ignore_states()