Hi,
Ok, I got further, here is a patch for setup.pl: --- setup_old.pl 2014-03-23 19:46:28.000000000 +0000 +++ setup_new.pl 2014-03-23 19:50:47.000000000 +0000 @@ -650,6 +650,16 @@ } } + # Check to see if there is a heading, otherwise add a default --LH + my ( $count_heading ) = $request->{dbh}->selectrow_array( + "SELECT COUNT(*) FROM chart WHERE charttype = 'H'" + ); + unless ( $count_heading ) { + $request->{dbh}->do( + "INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra) + VALUES (1, '0000', 'Minimal heading', 'H', '', '', '', false)"); + } + @{$request->{ar_accounts}} = _get_linked_accounts($request, "AR"); @{$request->{ap_accounts}} = _get_linked_accounts($request, "AP"); unshift @{$request->{ar_accounts}}, {}; Not many errors now: psql:/tmp/ledgersmb/1.2-1.3-upgrade.sql:358: 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:364: 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:372: 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:387: 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 Although I've ran out of time this weekend. Hopefully I'll be able to finish during the week. Lyle On 23/03/2014 17:13, Erik Huelsmann wrote:
|