update populate_default_entity to exclude legacy tables