Answers.Body: <p>This is resolved. For anyone else who runs into this stuff, the answer is to check the logs and read the error message and attempt to make the change to the DB manually. Most of the time, it will just be one issue that can be resolved by manually changing the item, then rerunning the civi database upgrade.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T06:59:57.583Z
Answers.LastActivityDate: 2021-10-20T06:59:57.583Z
Answers.UserDisplayName: user3010305
Body: <p>I saved a backup and I can revert, but I'd like to go forward with this upgrade. Can anyone please tell me how to fix this? Thanks in advance.</p>
  <p>I am upgrading from 5.17.5 (the last patch of 5.17) to 5.18</p>
  <hr />
  <p>[Error: Remove Index on domain_id that might have been randomly added in the same format as FK]
  Error Field Error Value
  Type    DB_Error
  Code    -1
  Message DB Error: unknown error
  Mode    16
  UserInfo    DROP INDEX FK_civicrm_dashboard_domain_id ON civicrm_dashboard [nativecode=1553 ** Cannot drop index 'FK_civicrm_dashboard_domain_id': needed in a foreign key constraint]
  DebugInfo   DROP INDEX FK_civicrm_dashboard_domain_id ON civicrm_dashboard [nativecode=1553 ** Cannot drop index 'FK_civicrm_dashboard_domain_id': needed in a foreign key constraint]
  PEAR_Exception: DB Error: unknown error in /home/catastrophic/www/civi/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php on line 922</p>
  <ul>
  <li>DB_Error: DB Error: unknown error in unknown on line unknown
  Exception trace</li>
  </ul>
  
Tags: <upgrade><database>
Title: WordPress Version 5.8.1, CiviCRM 5.18 plugin installed, but DB upgrade fails from civi 5.17.5 -> 5.18
ThreadText: # WordPress Version 5.8.1, CiviCRM 5.18 plugin installed, but DB upgrade fails from civi 5.17.5 -> 5.18
  
  (Asked by: username_0 on 2021-10-18)
  
  I saved a backup and I can revert, but I'd like to go forward with this upgrade. Can anyone please tell me how to fix this? Thanks in advance.
  
  I am upgrading from 5.17.5 (the last patch of 5.17) to 5.18
  
  ---
  
  [Error: Remove Index on domain\_id that might have been randomly added in the same format as FK]
  Error Field Error Value
  Type DB\_Error
  Code -1
  Message DB Error: unknown error
  Mode 16
  UserInfo DROP INDEX FK\_civicrm\_dashboard\_domain\_id ON civicrm\_dashboard [nativecode=1553 \*\* Cannot drop index 'FK\_civicrm\_dashboard\_domain\_id': needed in a foreign key constraint]
  DebugInfo DROP INDEX FK\_civicrm\_dashboard\_domain\_id ON civicrm\_dashboard [nativecode=1553 \*\* Cannot drop index 'FK\_civicrm\_dashboard\_domain\_id': needed in a foreign key constraint]
  PEAR\_Exception: DB Error: unknown error in /home/catastrophic/www/civi/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php on line 922
  
  * DB\_Error: DB Error: unknown error in unknown on line unknown
    Exception trace
  
  **Tags:** upgrade, database
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-10-20. Score: 0
  
  This is resolved. For anyone else who runs into this stuff, the answer is to check the logs and read the error message and attempt to make the change to the DB manually. Most of the time, it will just be one issue that can be resolved by manually changing the item, then rerunning the civi database upgrade.
  
  
  ---
  
  