Guides & Tutorials8.9 UpdateWHMCS 8.9General error: 3780 Referencing column 'invoice_id' and referenced column 'id' in foreign key constraint 'disccent_EarlyPaymentRecurring_ibfk_3' are incompatible.

General error: 3780 Referencing column 'invoice_id' and referenced column 'id' in foreign key constraint 'disccent_EarlyPaymentRecurring_ibfk_3' are incompatible.

Symptom

When updating to WHMCS 8.9, you may see the following error:

Unable to complete incremental updates: Unable to import the 8.9.0 Beta1  database file. Unable to import  /path/to/whmcs/resources/sql/upgrade890beta1.sql:  SQLSTATE[HY000]: General error: 3780 Referencing column 'invoice_id' and  referenced column 'id' in foreign key constraint  'disccent_EarlyPaymentRecurring_ibfk_3' are incompatible.

Cause

An after-market module "Discount Center" from the vendor ModulesGarden appears to add a table in the WHMCS database named disccent_EarlyPaymentRecurring. This table contains indexes with foreign key constraints related to the stock tblinvoices table. These constraints prevent the altering of the tblinvoices table during the 8.9 update process.

Workaround

The module vendor has provided a workaround. Please see the Discount Center upgrade instructions.

We suggest contacting the vendor's support directly for further assistance. The ModulesGarden support team can be contacted here; https://www.modulesgarden.com/support