SQL Error - cannot add foreign key constraints I'm uploading a site to a new environment and getting the following error:



The assetfiles table structure:
Based on that description, my guess is you're running into #2 here (https://stackoverflow.com/a/16969176/684) and you've got some inconsistent data in one of the three foreign key constraints that the SQL is trying to add.