xTuple.com xTupleU Blog & News Customer Support

Error updating from 4.11.1 to 4.11.2

After doing a migration run from QuickBooks Enterprise to xTuple 4.11.1, and everything seemingly looking good using the xTuple 4.11.1 client, I figured it was time to go to 4.11.2 and then 4.11.3 as we prepare to go live soon.

I’ve done test runs of the updater before without incident, but on this round I got this…

Checking Prerequisites…
Prerequisite: Checking xTuple Edition
Prerequisite: Checking for too-old xTuple ERP database version
Prerequisite: Checking for too-new xTuple ERP database version
Prerequisite: Checking for plv8 setup in postgresql.conf
Prerequisite: Checking for mobile-enabled schemas
Prerequisite: Checking for duplicate Credit Card payments on Sales Orders
Prerequisite: Checking for Comment Type Source consistency - cmnttype
Prerequisite: Checking for Comment Type Source consistency - source
Prerequisite: Checking for duplicate Screens
Prerequisite: Checking for duplicate Purchase Order Types
Ready to Start update!
NOTE: Have you backed up your database? If not, you should backup your database now. It is good practice to backup a database before updating it.
Starting Update at Wed May 23 15:02:47 2018
Applying database scripts…
The following error was encountered while trying to import postbooks-upgrade.sql into the database:
ERROR: update or delete on table “source” violates foreign key constraint “cmnttypesource_cmnttypesource_source_id_fkey” on table “cmnttypesource”
DETAIL: Key (source_id)=(47) is still referenced from table “cmnttypesource”.
QPSQL: Unable to create query

The upgrade has been aborted due to an error and your database was rolled back to the state it was in when the upgrade was initiated.

There aren’t very many entries in either table, and overall I’m a little baffled since 4.11.1 seems to run fine. :-/

Replying to myself here… but the fix (not sure how wise this will turn out to be) was to simply delete the offending row.