Upgrading from 8.3.1 to 8.5.4 Foreign Key

Keep getting this error when i update a site from 8.3.1 to 8.5.4

An exception occurred while executing ‘ALTER TABLE ExpressEntities ADD CONSTRAINT FK_BC772AA6CE45CBB0 FOREIGN KEY (pkgID) REFERENCES Packages (pkgID)’: SQLSTATE[HY000]: General error: 1005 Can’t create table Tebcom_concrete.ExpressEntities` (errno: 150 “Foreign key constraint is incorrectly formed”)

Are you sure you mean 5.5.4, the 5.5 series only went up to if I recall correctly?

Perhaps you meant 8.3.1 to 8.5.4?

Sorry my mistake it was late yes 8.3.1 to 8.5.4