health
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health] Issue upgrading a database from gnuhealth 3.2 to gnuhealth


From: Luis Falcon
Subject: Re: [Health] Issue upgrading a database from gnuhealth 3.2 to gnuhealth 3.4
Date: Wed, 19 Jun 2019 17:23:07 +0100

Dear Armand

On Wed, 19 Jun 2019 15:19:47 +0000 (UTC)
Armand MPASSY-NZOUMBA <address@hidden> wrote:

> Dear Luis and community,
> I am following up this issue. I tested the database upgrade process
> from 3.2 to 3.4 using the demo database. The purpose is to verify if
> the issues are coming from the official update scripts or from my
> database. Here are my findings: A/ I used the dump of the 3.2 demo
> database. I added a few records to it. I did get some error messages
> after applying trytond-admin and upgrade_34.sql. After re-applying
> trytond-admin and starting the tryton client, everything went well.
> B/ I tried the same process using the database here at the lab
> department. After starting the tryton I'm still getting the same
> issue. I am really puzzled. Does anyone has some experience updating
> a production database from 3.2 to 3.4?
> 
> Kind regards,
> Armand
> 
> 
> Here are the messages:
> 

Before upgrading you need to run the SQL script upgrade34.sql to the DB 
 
> $./trytond-admin --all –database=CIRMFTEST1_DEV1
> 
> 
> 
> 
> Traceback(most recent call last):
> 
>  File"./trytond-admin", line 21, in <module>
> 
>  admin.run(options)
> 
>  
> File"/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/admin.py",line
> 54, in run
> 
> 
> psycopg2.errors.ForeignKeyViolation:insert or update on table
> "party_party_account" violatesforeign key constraint
> "party_party_account_party_fkey"
> 
> DETAIL: Key (party)=(1517) is not present in table "party_party".
> 

Looks like some parties have been deleted and can not be referenced by
the account model..

> 
> 
> 
> B/
> 
> $psql CIRMFTEST1_DEV1 < upgrade_34.sql
> 
> 
> 
> 
> UPDATE65
> 
> DELETE28
> 
> DELETE8
> 
> 
> 
> 
> C/
> 
> 
> 
> 
> ./trytond-admin--all --database=CIRMFTEST1_DEV1
> 
>  
> Traceback(most recent call last):
> 
>  File"./trytond-admin", line 21, in <module>
> 
>  admin.run(options)
> 
> 
> psycopg2.errors.ForeignKeyViolation:insert or update on table
> "product_list_price" violatesforeign key constraint
> "product_list_price_template_fkey"
> 
> DETAIL: Key (template)=(563) is not present in table
> "product_template".
> 
Sam as in the case of parties. Looks l 
> 
> 
> D/
> 
> startedtryton server and Tryton client
> 
> 
> 
> 
> Traceback(most recent call last):
> 
>  File"/usr/bin/tryton", line 67, in <module>

It looks like Tryton client has been installed globally... I recommend
to do local installations (pypi --user install ....)

> 
>  client.TrytonClient().run()
>  raiseFault(*response['error'])
> 
> Fault:<Fault u'column a.fed_country does not exist\nLINE

The party model has not been updated with the new fields
from version 3.4. 

fed_country, among others, are new fields from version 3.4... The
update ( --all ) process should have migrated to the new data model
automatically.

It's a bit hard to see from emails what might have gone wrong with
your update. 

Let's talk and we'll find out.

All the best
Luis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]