credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #04905
[Merge] lp:~openupgrade-committers/openupgrade-server/6.1_drop_index into lp:openupgrade-server
Holger Brunn (Therp) has proposed merging lp:~openupgrade-committers/openupgrade-server/6.1_drop_index into lp:openupgrade-server.
Requested reviews:
OpenUpgrade Committers (openupgrade-committers)
For more details, see:
https://code.launchpad.net/~openupgrade-committers/openupgrade-server/6.1_drop_index/+merge/114369
--
https://code.launchpad.net/~openupgrade-committers/openupgrade-server/6.1_drop_index/+merge/114369
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~openupgrade-committers/openupgrade-server/6.1_drop_index into lp:openupgrade-server.
=== modified file 'openerp/openupgrade/openupgrade.py'
--- openerp/openupgrade/openupgrade.py 2012-06-11 14:13:32 +0000
+++ openerp/openupgrade/openupgrade.py 2012-07-11 09:34:41 +0000
@@ -106,6 +106,7 @@
logger.info("table %s, column %s: renaming to %s",
table, old, new)
cr.execute('ALTER TABLE "%s" RENAME "%s" TO "%s"' % (table, old, new,))
+ cr.execute('DROP INDEX IF EXISTS "%s_%s_index"' % (table, old))
def rename_tables(cr, table_spec):
"""
Follow ups