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:
+1
-1
@@ -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 " \
|
||||
|
||||
Reference in New Issue
Block a user