[7.0] ProgrammingError when migrating project

Bug #1318686 reported by Yann Papouin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenUpgrade Addons
Fix Released
Undecided
Unassigned

Bug Description

2014-05-12 12:27:26,334 5448 INFO dec_database openerp.modules.migration: module project: Running migration [>7.0.1.1] pre-migration
2014-05-12 12:27:26,335 5448 INFO dec_database OpenUpgrade: project: pre-migration script called with version 6.1.1.1
2014-05-12 12:27:26,335 5448 INFO dec_database OpenUpgrade: table account_analytic_account, column state: renaming to openupgrade_legacy_7_0_state
2014-05-12 12:27:26,336 5448 INFO dec_database OpenUpgrade: table project_task, column type_id: renaming to stage_id
2014-05-12 12:27:26,337 5448 INFO dec_database OpenUpgrade: table project_task_type, column project_default: renaming to case_default
2014-05-12 12:27:26,345 5448 INFO dec_database openerp.modules.module: module project: creating or updating database tables
2014-05-12 12:27:26,486 5448 WARNING dec_database openerp.osv.orm: WARNING: unable to set column alias_id of table project_project not null !
Try to re-run: openerp-server --update=module
If it doesn't work, update records and execute manually:
ALTER TABLE project_project ALTER COLUMN alias_id SET NOT NULL

2014-05-12 12:27:31,102 5448 ERROR dec_database openerp.sql_db: Programming error: table name "project_project" specified more than once
, in query
        UPDATE project_project
        SET state = account_analytic_account.openupgrade_legacy_7_0_state
        FROM project_project
        INNER JOIN account_analytic_account
        ON account_analytic_account.id = project_project.analytic_account_id
        WHERE analytic_account_id is not NULL

2014-05-12 12:27:31,102 5448 ERROR dec_database OpenUpgrade: project: error in migration script /home/ubuntu/projects/openupgrade/addons/project/migrations/7.0.1.1/post-migration.py: table name "project_project" specified more than once

2014-05-12 12:27:31,102 5448 ERROR dec_database OpenUpgrade: table name "project_project" specified more than once
Traceback (most recent call last):
  File "/home/ubuntu/projects/openupgrade/server/openerp/openupgrade/openupgrade.py", line 471, in wrapped_function
    func(cr, version)
  File "project/migrations/7.0.1.1/post-migration.py", line 68, in migrate
  File "project/migrations/7.0.1.1/post-migration.py", line 33, in copy_state_from_analytic_account
  File "/home/ubuntu/projects/openupgrade/server/openerp/openupgrade/openupgrade.py", line 328, in logged_query
    res = cr.execute(query, args)
  File "/home/ubuntu/projects/openupgrade/server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/home/ubuntu/projects/openupgrade/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
ProgrammingError: table name "project_project" specified more than once

2014-05-12 12:27:31,103 5448 ERROR dec_database openerp.modules.loading: Error executing post migration script for module project
: table name "project_project" specified more than once

Related branches

Changed in openupgrade-addons:
status: New → Fix Committed
Changed in openupgrade-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.