Merge pull request #94 from hbrunn/7.0-fix-migration

[FIX] don't pass column name as sql parameters
This commit is contained in:
Stefan Rijnhart (Therp)
2015-01-16 09:14:08 +01:00

View File

@@ -37,7 +37,7 @@ def rename_columns(cr, column_spec):
for table in column_spec.keys():
for (old, new) in column_spec[table]:
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('ALTER TABLE %s RENAME %s TO %s' % (table, old, new,))
cr.execute('DROP INDEX IF EXISTS "%s_%s_index"' % (table, old))