fix adding primary key during table alteration in MySQL