Answers.Body: <p>Based on that description, my guess is you're running into #2 here (<a href="https://stackoverflow.com/a/16969176/684">https://stackoverflow.com/a/16969176/684</a>) and you've got some inconsistent data in one of the three foreign key constraints that the SQL is trying to add.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-04T08:58:30.653Z
Answers.Text: Ok, how might I go about sorting that out? I uploaded the same DB to another host and it was fine.
Answers.UserDisplayName: sarah3585
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-03T18:05:24.653Z
Answers.LastActivityDate: 2017-05-03T18:05:24.653Z
Answers.LastEditDate: 2017-05-23T12:38:53.957Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm uploading a site to a new environment and getting the following error:</p>
  
  <p><a href="https://i.sstatic.net/LGAYO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LGAYO.png" alt="error message"></a></p>
  
  <p><strong>The assetfiles table structure:</strong>
  <a href="https://i.sstatic.net/vrlLo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/vrlLo.png" alt="The assetfiles table structure"></a></p>
  
Tags: <error-message><mysql>
Title: SQL Error - cannot add foreign key constraints
ThreadText: # SQL Error - cannot add foreign key constraints
  
  (Asked by: username_0 on 2017-05-03)
  
  I'm uploading a site to a new environment and getting the following error:
  
  [![error message](https://i.sstatic.net/LGAYO.png)](https://i.sstatic.net/LGAYO.png)
  
  **The assetfiles table structure:**
  [![The assetfiles table structure](https://i.sstatic.net/vrlLo.png)](https://i.sstatic.net/vrlLo.png)
  
  **Tags:** error-message, mysql
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-05-03. Score: 1
  
  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.
  
  > **Comments:**
  > **username_0**: Ok, how might I go about sorting that out? I uploaded the same DB to another host and it was fine.  
  
  ---
  
  