Merge lp:~zaber/openupgrade-server/rename-index into lp:openupgrade-server/6.0

Proposed by Don Kirkby on 2012-07-10
Status: Merged
Merged at revision: 3492
Proposed branch: lp:~zaber/openupgrade-server/rename-index
Merge into: lp:openupgrade-server/6.0
Diff against target: 11 lines (+1/-0)
1 file modified
bin/openupgrade/openupgrade.py (+1/-0)
To merge this branch: bzr merge lp:~zaber/openupgrade-server/rename-index
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) 2012-07-10 Approve on 2012-07-11
Review via email: mp+114285@code.launchpad.net

Description of the change

Fix bug 1023173 by dropping the index during a column rename.

To post a comment you must log in.
Holger Brunn (Therp) (hbrunn) wrote :

thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/openupgrade/openupgrade.py'
2--- bin/openupgrade/openupgrade.py 2012-06-23 14:23:36 +0000
3+++ bin/openupgrade/openupgrade.py 2012-07-10 22:03:19 +0000
4@@ -105,6 +105,7 @@
5 logger.info("table %s, column %s: renaming to %s",
6 table, old, new)
7 cr.execute('ALTER TABLE "%s" RENAME "%s" TO "%s"' % (table, old, new,))
8+ cr.execute('DROP INDEX IF EXISTS "%s_%s_index"' % (table, old))
9
10 def rename_tables(cr, table_spec):
11 """

Subscribers

People subscribed via source and target branches