I'm having another go at it right now.
I've worked through the scripts and SQL files to understand the
upgrade process. It's a shame the setup.pl file doesn't have as
much POD and comments as a lot of the .pm files do.
I've been doing most of the upgrade manually so that I can see exactly where it's breaking. There are errors along the way, but I'm guessing they are expected as you say. I took the upgrade out of a transaction so it would keep processing and I could get some useful errors after the first. I've included them all at the bottom of this post, although the most interesting ones are here: psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:28: ERROR: null value in column "heading" violates not-null constraint DETAIL: Failing row contains (2, 0010, Freehold Property, A, , null, f, f). CONTEXT: SQL statement "INSERT INTO account (accno, description, category, gifi_accno, heading, contra, tax) VALUES (in_accno, in_description, in_category, in_gifi_accno, t_heading_id, in_contra, in_tax)" PL/pgSQL function account_save(integer,text,text,character,text,integer,boolean,boolean,text[]) line 48 at SQL statement psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:58: ERROR: new row for relation "entity_credit_account" violates check constraint "entity_credit_account_check" DETAIL: Failing row contains (3, 67, 1, null, null, null, 0, null, f, 0, 0, 7, 0, en, null, null, 2010-01-01, null, 0, null, null, null, null, null, null). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:73: ERROR: new row for relation "entity_credit_account" violates check constraint "entity_credit_account_check" DETAIL: Failing row contains (4, 139, 2, null, null, null, 0, null, f, 0, 0, 257, 0, en, null, null, 2010-04-29, null, 0, null, null, null, null, null, null). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:125: ERROR: null value in column "credit_id" violates not-null constraint DETAIL: Failing row contains (null, 12, comet.co.uk, email address: ). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:157: ERROR: null value in column "credit_id" violates not-null constraint DETAIL: Failing row contains (null, 1, 6503210446, Primary phone: iss). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:356: ERROR: new row for relation "entity" violates check constraint "entity_name_check" DETAIL: Failing row contains (389, , 3, 2014-03-23, E-2, 78). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:362: ERROR: null value in column "entity_id" violates not-null constraint DETAIL: Failing row contains (1, null, null, , null, , 2014-03-23). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:370: ERROR: null value in column "entity_id" violates not-null constraint DETAIL: Failing row contains (null, 2011-04-12, null, user, null, t, null, 2, null). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:385: ERROR: null value in column "entity_id" violates not-null constraint DETAIL: Failing row contains (1, cosmic, 7 days, null). CONTEXT: SQL statement "insert into users (id, username, entity_id) VALUES ( v_user_id, in_username, in_entity_id )" PL/pgSQL function admin__save_user(integer,integer,text,text,boolean) line 49 at SQL statement psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:435: ERROR: null value in column "entity_credit_account" violates not-null constraint DETAIL: Failing row contains (10959, 39, 2011-06-17, null, f, 312, 260, 312, 2011-06-22, 2011-06-17, t, , 0, , GBP, AAPcustom5579, null, null, , , 10791, , null, , f, f, t, null, null, null, null). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:452: ERROR: null value in column "entity_credit_account" violates not-null constraint DETAIL: Failing row contains (10809, 9, 2010-12-02, null, f, 43.46, 36.99, 43.46, 2010-12-06, 2010-12-02, f, 0116 05 0107 112, GBP, , null, null, null, null, 10791, null, null, , null, f, t, f, 0, null, null, null, null). psql:/tmp/ledgersmb/1.2-1.3-upgrade_.sql:470: ERROR: insert or update on table "invoice" violates foreign key constraint "invoice_trans_id_fkey" DETAIL: Key (trans_id)=(10959) is not present in table "transactions". I'm just looking at the new table constraint definitions to figure out what fixes need to be ran first. Note: I did a post with a full dump, but that is currently awaiting moderation due to it's size. Lyle |