Fix TypeError on drop_column for SQLite
It uses now tuple unpacking on the loop. It was introduced in changeset a3ef75ef8f6a issue2647 review32641002
This commit is contained in:
1 parent
4a1e38d01b
commit
e954c2fe38
1 file changed
+4
-4
@@ -299,10 +299,10 @@ class TableHandler(TableHandlerInterface):
|
||||
logger.warning('Unable to drop column: Error renaming '
|
||||
'table %s to temp!', self.table_name)
|
||||
new_table = TableHandler(self._model, history=self.history)
|
||||
for col in self._columns.iteritems():
|
||||
if col != column_name:
|
||||
new_table.add_raw_column(col, col['typname'], True,
|
||||
field_size=col['size'])
|
||||
for name, column in self._columns.iteritems():
|
||||
if name != column_name:
|
||||
new_table.add_raw_column(name, column['typname'], True,
|
||||
field_size=column['size'])
|
||||
columns_name = [x for x in new_table._columns.keys()]
|
||||
cursor.execute(('INSERT INTO "%s" (' +
|
||||
','.join('"%s"' % c for c in columns_name) +
|
||||
|
||||
Reference in new issue
Block a user