fix bug: AUTOINCREMENT columns have to be primary key