validates_uniqueness_of uses the primary key index if it's available