Delete primary key on keepright errors