SQL设置主外键关联时报错: cannot set foreign key原因是因为:我主标的外键(parent_id)的数据类型 smallint 与外表关联的字(id) mediaint 的数据类型不一致