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
This commit is contained in:
P. Christeas
2010-11-23 15:57:48 +02:00
parent 6cd5fec0e2
commit ba47847b20
+1 -1
View File
@@ -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 " \