sql foreign key type fix