MySQL 5.5 add foreign key fails with errors [HY000][150] and [HY000][1005]
It is possible is that Mysql gives this bad error when the column types do not match exactly - check collation / size etc.
orderLineItem.shippingType
has character set utf8
, but ShippingType.name
has character set latin1
. These are not compatible for the purposes of foreign key references.