health
[Top][All Lists]
Advanced

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

[Health] Issue upgrading a database from gnuhealth 3.2 to gnuhealth 3.4


From: Armand MPASSY-NZOUMBA
Subject: [Health] Issue upgrading a database from gnuhealth 3.2 to gnuhealth 3.4
Date: Wed, 19 Jun 2019 15:19:47 +0000 (UTC)

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:

$ ./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

installdeps=options.installdeps)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/pool.py", line 153, in init

lang=lang, installdeps=installdeps)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/__init__.py", line 462, in load_modules

_load_modules(update)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/__init__.py", line 432, in _load_modules

load_module_graph(graph, pool, update, lang)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/__init__.py", line 244, in load_module_graph

cls.__register__(module)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/account/party.py", line 297, in __register__

cls._migrate_property([], [], [])

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/account/party.py", line 306, in _migrate_property

parent='party', fields=fields)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/tools/multivalue.py", line 111, in migrate_property

columns + pcolumns + vcolumns, values=values))

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/backend/postgresql/database.py", line 60, in execute

cursor.execute(self, sql, args)

psycopg2.errors.ForeignKeyViolation: insert or update on table "party_party_account" violates foreign key constraint "party_party_account_party_fkey"

DETAIL: Key (party)=(1517) is not present in table "party_party".


B/

$ psql CIRMFTEST1_DEV1 < upgrade_34.sql


UPDATE 65

DELETE 28

DELETE 8


C/


./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

installdeps=options.installdeps)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/pool.py", line 153, in init

lang=lang, installdeps=installdeps)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/__init__.py", line 462, in load_modules

_load_modules(update)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/__init__.py", line 432, in _load_modules

load_module_graph(graph, pool, update, lang)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/__init__.py", line 244, in load_module_graph

cls.__register__(module)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/product/product.py", line 373, in __register__

cls._migrate_property([], [], [])

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/modules/product/product.py", line 382, in _migrate_property

parent='template', fields=fields)

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/tools/multivalue.py", line 111, in migrate_property

columns + pcolumns + vcolumns, values=values))

File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.16/trytond/backend/postgresql/database.py", line 60, in execute

cursor.execute(self, sql, args)

psycopg2.errors.ForeignKeyViolation: insert or update on table "product_list_price" violates foreign key constraint "product_list_price_template_fkey"

DETAIL: Key (template)=(563) is not present in table "product_template".


D/

started tryton server and Tryton client


Traceback (most recent call last):

File "/usr/bin/tryton", line 67, in <module>

client.TrytonClient().run()

File "/usr/lib/python2.7/site-packages/tryton/client.py", line 293, in run

main.sig_login()

File "/usr/lib/python2.7/site-packages/tryton/gui/main.py", line 876, in sig_login

common.Login(func)


File "/usr/lib/python2.7/site-packages/tryton/common/common.py", line 1049, in __init__

func(parameters)

File "/usr/lib/python2.7/site-packages/tryton/gui/main.py", line 873, in <lambda>

host, port, database, username, parameters, language)

File "/usr/lib/python2.7/site-packages/tryton/rpc.py", line 72, in login

result = connection.common.db.login(username, parameters, language)

File "/usr/lib64/python2.7/xmlrpclib.py", line 1243, in __call__

return self.__send(self.__name, args)

File "/usr/lib/python2.7/site-packages/tryton/jsonrpc.py", line 297, in __request

raise Fault(*response['error'])

Fault: <Fault u'column a.fed_country does not exist\nLINE 1: ...education", "a"."ethnic_group" AS "ethnic_group", "a"."fed_c...\n ^\n': u'Traceback (most recent call last):\n File "/trytond/wsgi.py", line 70, in dispatch_request\n return endpoint(request, **request.view_args)\n File "/trytond/protocols/dispatcher.py", line 41, in rpc\n request, database_name, *request.rpc_params)\n File "/trytond/protocols/dispatcher.py", line 54, in login\n database_name, user, parameters, language=language)\n File "/trytond/security.py", line 41, in login\n session, = Session.create([{}])\n File "/trytond/model/modelsql.py", line 605, in create\n cls._validate(sub_records)\n File "/trytond/model/modelstorage.py", line 37, in wrapper\n return func(*args, **kwargs)\n File "/trytond/model/modelstorage.py", line 963, in _validate\n ctx_pref = User.get_preferences(context_only=True)\n File "/trytond/res/user.py", line 432, in get_preferences\n preferences = cls._get_preferences(user, context_only=context_only)\n File "/trytond/modules/company/company.py", line 196, in _get_preferences\n context_only=context_only)\n File "/trytond/res/user.py", line 395, in _get_preferences\n getattr(user, field).rec_name\n File "/trytond/model/fields/field.py", line 283, in __get__\n return inst.__getattr__(self.name)\n File "/trytond/model/modelstorage.py", line 1436, in __getattr__\n read_data = self.read(list(ids), list(ffields.keys()))\n File "/trytond/model/modelsql.py", line 779, in read\n getter_results = field.get(ids, cls, field_list, values=result)\n File "/trytond/model/fields/function.py", line 102, in get\n return dict((name, call(name)) for name in names)\n File "/trytond/model/fields/function.py", line 102, in <genexpr>\n return dict((name, call(name)) for name in names)\n File "/trytond/model/fields/function.py", line 96, in call\n return dict((r.id, method(r, name)) for r in records)\n File "/trytond/model/fields/function.py", line 96, in <genexpr>\n

return dict((r.id, method(r, name)) for r in records)\n File "/trytond/modules/company/company.py", line 52, in get_rec_name\n return self.party.rec_name\n File "/trytond/model/fields/field.py", line 283, in __get__\n return inst.__getattr__(self.name)\n File "/trytond/model/modelstorage.py", line 1436, in __getattr__\n read_data = self.read(list(ids), list(ffields.keys()))\n File "/trytond/model/modelsql.py", line 779, in read\n getter_results = field.get(ids, cls, field_list, values=result)\n File "/trytond/model/fields/function.py", line 102, in get\n return dict((name, call(name)) for name in names)\n File "/trytond/model/fields/function.py", line 102, in <genexpr>\n return dict((name, call(name)) for name in names)\n File "/trytond/model/fields/function.py", line 96, in call\n return dict((r.id, method(r, name)) for r in records)\n File "/trytond/model/fields/function.py", line 96, in <genexpr>\n return dict((r.id, method(r, name)) for r in records)\n File "/trytond/modules/health/health.py", line 802, in get_rec_name\n if self.lastname:\n File "/trytond/model/fields/field.py", line 283, in __get__\n return inst.__getattr__(self.name)\n File "/trytond/model/modelstorage.py", line 1436, in __getattr__\n read_data = self.read(list(ids), list(ffields.keys()))\n File "/trytond/model/modelsql.py", line 693, in read\n order_by=history_order, limit=history_limit))\n File "/trytond/backend/postgresql/database.py", line 60, in execute\n cursor.execute(self, sql, args)\npsycopg2.errors.UndefinedColumn: column a.fed_country does not exist\nLINE 1: ...education", "a"."ethnic_group" AS "ethnic_group", "a"."fed_c...\n ^\n\n'>







reply via email to

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