health
[Top][All Lists]
Advanced

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

[Health] Migration problem from 2.8 to 3.0


From: Francisco J. A.
Subject: [Health] Migration problem from 2.8 to 3.0
Date: Tue, 12 Jul 2016 21:14:10 -0300

Hello everyone! I am writing to inquire about migration. I want to upgrade from version 2.8 to 3.0 (Tryton 3.4 to 3.8). And I made the backup of the DB and the core. Now I have perfectly running version 3.0 (in a new db), but when I restore the database of 2.8 and run:

./trytond --verbose  --all --database=migration

I get the following warnings:

 
WARNING trytond.backend.postgresql.table Unable to migrate login on table res_user_login_attempt column from varchar () to varchar (512).

The process then continues and..:


WARNING trytond.backend.postgresql.table unable to add 'UNIQUE("code")' constraint on table gnuhealth_healthprofessional !
If you want to have it, you should update the records and execute manually:
ALTER table "gnuhealth_healthprofessional" ADD CONSTRAINT "gnuhealth_healthprofessional_code_uniq" UNIQUE("code")

Traceback (most recent call last):
  File "./trytond", line 80, in <module>
    server.TrytonServer(options).run()
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/server.py", line 112, in run
    Pool(db_name).init(update=self.options.update, lang=lang)
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/pool.py", line 155, in init
    lang=lang)
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/modules/__init__.py", line 427, in load_modules
    _load_modules()
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/modules/__init__.py", line 394, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/modules/__init__.py", line 234, in load_module_graph
    cls.__register__(module)
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/modules/health/health.py", line 1691, in __register__
    super(HealthProfessional, cls).__register__(module_name)
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/model/modelsql.py", line 211, in __register__
    table.add_constraint(ident, constraint)
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/backend/postgresql/table.py", line 414, in add_constraint
    self._update_definitions()
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/backend/postgresql/table.py", line 152, in _update_definitions
    (self.table_name, self.table_schema))
  File "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/backend/postgresql/database.py", line 294, in execute
    return self.cursor.execute(sql, params)
psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block


Then when I try to connect to the "updated database"  get the following error in the tryton client:

Traceback (most recent call last):
  File "/trytond/protocols/jsonrpc.py", line 162, in _marshaled_dispatch
    response['result'] = dispatch_method(method, params)
  File "/trytond/protocols/jsonrpc.py", line 191, in _dispatch
    res = dispatch(*args)
  File "/trytond/protocols/dispatcher.py", line 41, in dispatch
    res = security.login(database_name, user, session)
  File "/trytond/security.py", line 33, in login
    session, = Session.create([{}])
  File "/trytond/model/modelsql.py", line 581, in create
    cls._validate(sub_records)
  File "/trytond/model/modelstorage.py", line 891, in _validate
    ctx_pref = User.get_preferences(context_only=True)
  File "/trytond/res/user.py", line 359, in get_preferences
    preferences = cls._get_preferences(user, context_only=context_only)
  File "/trytond/modules/company/company.py", line 166, in _get_preferences
    context_only=context_only)
  File "/trytond/res/user.py", line 322, in _get_preferences
    getattr(user, field).rec_name
  File "/trytond/model/fields/field.py", line 232, in __get__
    return inst.__getattr__(self.name)
  File "/trytond/model/modelstorage.py", line 1340, in __getattr__
    read_data = self.read(list(ids), ffields.keys())
  File "/trytond/model/modelsql.py", line 741, in read
    getter_results = field.get(ids, cls, field_list, values=result)
  File "/trytond/model/fields/function.py", line 92, in get
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 92, in <genexpr>
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 86, in call
    return dict((r.id, method(r, name)) for r in records)
  File "/trytond/model/fields/function.py", line 86, in <genexpr>
    return dict((r.id, method(r, name)) for r in records)
  File "/trytond/modules/company/company.py", line 51, in get_rec_name
    return self.party.name
  File "/trytond/model/fields/field.py", line 232, in __get__
    return inst.__getattr__(self.name)
  File "/trytond/model/modelstorage.py", line 1340, in __getattr__
    read_data = self.read(list(ids), ffields.keys())
  File "/trytond/model/modelsql.py", line 671, in read
    order_by=history_order, limit=history_limit))
  File "/trytond/backend/postgresql/database.py", line 294, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: column a.name_representation does not exist
LINE 1: ..._identification", "a"."write_uid" AS "write_uid", "a"."name_...
                                                             ^


Thank you very much for taking the time to read my query. Greetings from Argentina

reply via email to

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