** Branch linked: lp:~zaber/openupgrade-server/rename-index -- You received this bug notification because you are a member of OpenUpgrade Committers, which is the registrant for OpenUpgrade Server. https://bugs.launchpad.net/bugs/1023173
Title: Renaming column creates duplicate index Status in OpenUpgrade Server: New Bug description: When I try to upgrade from 5.0.16 to 6.0, I get the following error: psycopg2.ProgrammingError: relation "hr_employee_parent_id_index" already exists Steps to reproduce: 1. Create a new database in 5.0 with no sample data and the manufacturing industry profile. 2. Leave the default values for all the setup steps, and set the chart of accounts to "None". 3. Create a new product category called "All Products". 4. Create a new product called "paperclip", and use the category you just created. 5. Run the migration using the options, "--update all --stop-after-init". The error occurs as listed above. The full command line I use for the migration is as follows: python openerp-server.py --database migrationtest --update all --stop-after-init --addons ~/upgrade-addons-6.0 --config ~/openerp-server.config I only see this error after applying my fix for bug 1023164. Analysis: In addons/hr/migrations/6.0.1.1/pre-migration.py, it renames the parent_id column to openupgrade_legacy_parent_id, but doesn't rename the index. When the regular migration adds a new parent_id column, it also tries to add the index, but fails when the index already exists. The old index should either be dropped or renamed when the column is renamed. To manage notifications about this bug go to: https://bugs.launchpad.net/openupgrade-server/+bug/1023173/+subscriptions -- Mailing list: https://launchpad.net/~credativ Post to : [email protected] Unsubscribe : https://launchpad.net/~credativ More help : https://help.launchpad.net/ListHelp

