[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error when upgrading 1.2 db to 1.3 db
- Subject: Re: Error when upgrading 1.2 db to 1.3 db
- From: Michael Richardson <..hidden..>
- Date: Tue, 03 Jan 2012 13:27:47 -0500
>>>>> "Nigel" == Nigel Titley <..hidden..> writes:
>> No doesn't seem to have made any difference. Still the same error
>>
>> psql:/tmp/ledgersmb/1.2-1.3-upgrade.sql:30: ERROR: null value in
>> column "heading" violates not-null constraint CONTEXT: SQL
>> statement "INSERT INTO account (accno, description, category,
>> gifi_accno, heading, contra, tax) VALUES ( $1 , $2 , $3 , $4 , $5
>> , $6 , $7 )" PL/pgSQL function "account_save" line 47 at SQL
>> statement
Nigel> Has anyone had any thoughts on this? I'm still stuck.
This is what I did.
I started my psql against my database.
The code at that line is:
SELECT account_save(id, accno, description, category, gifi_accno, NULL, contra,
CASE WHEN link like '%tax%' THEN true ELSE false END,
string_to_array(link,':'))
FROM lsmb12.chart
WHERE charttype = 'A';
so, I ran it like:
SELECT account_save(id, accno, description, category, gifi_accno, NULL, contra,
CASE WHEN link like '%tax%' THEN true ELSE false END,
string_to_array(link,':'))
FROM lsmb12.chart
WHERE charttype = 'A' ORDER BY accno OFFSET 0 LIMIT 1;
then incrementing the "OFFSET" value until I found the problem.
You may have to "delete from account;" if you have to retry things.
--
] He who is tired of Weird Al is tired of life! | firewalls [
] Michael Richardson, Sandelman Software Works, Ottawa, ON |net architect[
] ..hidden.. http://www.sandelman.ottawa.on.ca/ |device driver[
Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
then sign the petition.