Replace primary key