adds unique constraint to types