[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: Nigel Titley <..hidden..>
- Date: Sat, 31 Dec 2011 17:31:57 +0000
On 31/12/11 15:40, Nigel Titley wrote:
> On 31/12/11 11:26, Nigel Titley wrote:
>> On 31/12/11 10:23, Nigel Titley wrote:
>>> On 31/12/11 09:50, Chris Travers wrote:
>>>
>>>> Ok now we are getting somewhere.
>>>>
>>>> What username are you using to set up the database? It must be a
>>>> database superuser.
>>>
>>> I was using postgres. However, I've now added "create database"
>>> privilege to the ledgersmb user and the process has largely gone through
>>> with the exception of the creation (or in my case the importation) of
>>> the first user. I now seem to have a database but without any valid users.
>>>
>>> I'm going to roll back and start the process again as I'm not sure what
>>> state the database is in.
>>
>> OK, this is much better (sort of).
>>
>> Some background: this is a new machine, postgres 8.4, Ubuntu maverick.
>> I've set up a new database "testinc" using setup.pl and this largely
>> works OK (with the exception of the (possible) bugs I've reported so far).
>>
>> I now decided to try and import the production database from our
>> business, which runs on a different machine, same version of postgres
>> and Ubuntu. I took the following steps:
>>
>> 1. Dumped a copy of the production database
>> 2. Copied it across to the new machine and copied it into a new database
>> "test", owned by ledgersmb.
>> 3. Ran up setup.pl, logged in as ledgersmb with database "test",
>> corrected some duplicate company numbers and some duplicate invoice
>> numbers, imported an existing user from the "testinc" database.
>> 4. Setup completed without errors.
>> 5. Logged into new database successfully.
>>
>> All fine so far. However the "test" database is empty, no customers, no
>> vendors, no transactions, no COA.
>>
>> A clue may be the following in the dblog_stderr file
>>
>> 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
>
> OK, I've done a bit more digging and I think the error is a result of my
> having no heading accounts. I'm going to try creating one and seeing if
> this fixes the problem.
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