database rebuild after primary key fix