Upgraded from 4.6.19 to 4.7.27 (on wordpress 4.8.3) and attempted to update indices. The table that fails is civicrm_case_contact, with the old index UI_case_contact_id. The error is identical to that reported in this question https://stackoverflow.com/questions/1451042/mysql-error-when-dropping-index-errno-150
There are a number of possibilities listed in the answers to that, but I'm a SQL newbie and the data structures should be familiar to developers following this forum. Any ideas on what's the likeliest cause?
In our application we have not encountered cases and the table is empty. Would it be best to disable CiviCase and delete relevant tables? Or is that asking for more trouble?
SHOW CREATE TABLE civicrm_case_contact
and manually adjust. But the error happens because of the foreign keys on the table, so you'd need to drop those first, then re-add them.