Unique index validation for entity state table