Fix foreign key type in has-many