fixes #4691 - add search for hosts' managed status

a DB migration is needed, as this field has no default value at the moment