From ba47847b20f719016cb1f23348bc002dadbb304c Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Tue, 23 Nov 2010 15:57:48 +0200 Subject: [PATCH] ORM: moved columns should carry the old name, not the table When a column changes type in module upgrades, we have code to rename the column. The new name shall be based on the old column name, not the name of the table. bzr revid: p_christ@hol.gr-20101123135748-z8rtmy36c8u972xb --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index a0473c14e8d..4dba5902739 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2604,7 +2604,7 @@ class orm(orm_template): if not ok: i = 0 while True: - newname = self._table + '_moved' + str(i) + newname = k + '_moved' + str(i) cr.execute("SELECT count(1) FROM pg_class c,pg_attribute a " \ "WHERE c.relname=%s " \ "AND a.attname=%s " \