fix for primary key on sanitize attributes, plus leaner unique rule builder