[misc] Fix error when inserting affiliation data in InnoDB tables