Simplified code that gets list of attributes with uniqueness constraints