Common Upgrade Issues

This page is designed as a companion page to DebuggingUpgradeErrors. Reading the companion page first will help you learn more about how xTuple ERP upgrade packages are assembled--and how you can dis-assemble them to fix errors encountered when upgrading from one version of xTuple ERP to the next.

Once you have a better understanding of upgrade packages, you will find this page useful for fixing common--and also version-specific--errors encountered during the version upgrade process. If you encounter errors that are not currently listed on this page, please consider becoming a wiki contributor by sending an email to <wiki@xtuple.com> expressing your interest.

Note: In between fixes, it is important to log out of the updater program before running the update script again.

Check for Duplicate Sales Order Line Item Number

You have one or more Sales Orders with duplicate Line Item Numbers.

SELECT *
FROM (SELECT coitem_cohead_id, coitem_linenumber, count(*)
FROM coitem
GROUP BY coitem_cohead_id, coitem_linenumber
HAVING count(*) > 1) AS data;

** Run this until ZERO records are updated.

BEGIN;
UPDATE coitem SET coitem_linenumber = 1+(select max(coitem_linenumber)
FROM coitem where coitem_cohead_id = coheadid)
FROM (SELECT max(coitem_id) AS coitemid, coitem_cohead_id AS coheadid ,coitem_linenumber
FROM coitem
GROUP BY coitem_cohead_id, coitem_linenumber HAVING count(*) > 1) AS data
WHERE coitem_id = coitemid;

ROLLBACK OR COMMIT

Check for Duplicate Invoice Line Item Number

You have one or more Invoices with duplicate Line Item Numbers.

SELECT *
FROM (SELECT invcitem_invchead_id, invcitem_linenumber, count(*)
FROM invcitem
GROUP BY invcitem_invchead_id, invcitem_linenumber
HAVING count(*) > 1) AS data;

** Run this until ZERO records are updated.

BEGIN;
UPDATE invcitem SET invcitem_linenumber = 1+(select max(invcitem_linenumber)
FROM invcitem where invcitem_invchead_id = invcheadid)
FROM (SELECT max(invcitem_id) AS invcitemid, invcitem_invchead_id AS invcheadid ,invcitem_linenumber
FROM invcitem
GROUP BY invcitem_invchead_id, invcitem_linenumber HAVING count(*) > 1) AS data
WHERE invcitem_id = invcitemid;

ROLLBACK OR COMMIT

ERROR: role "admin" does not exist

PSQL: Unable to create query.

This error is due to the new naming convention for the administrative user in xTuple. Create the user 'admin' to repair this error.

CREATE USER admin WITH PASSWORD 'admin'
CREATEDB CREATEUSER
IN GROUP openmfg;

Version-Specific Errors

This section provides links to separate pages where you can version-specific fixes. Errors for the following versions are currently documented:

CommonUpgradeIssues (last edited 2008-11-26 21:12:42 by ptyler)