Index creation will fail if the uniqueness constraint is violated, so what I'm asking is whether you have verified that there are no duplicates for external_id.