Commit dab63daa authored by Julien Muchembled's avatar Julien Muchembled

Fix DA._upgradeSchema doing useless 'MODIFY COLUMN' after dropped columns

This is not perfect. There can still be dummy 'MODIFY COLUMN' when the order
of columns changes.
parent 0ee4734c
...@@ -299,9 +299,11 @@ def DA_upgradeSchema(self, connection_id=None, src__=0): ...@@ -299,9 +299,11 @@ def DA_upgradeSchema(self, connection_id=None, src__=0):
old_dict = {} old_dict = {}
new = {column[0] for column in new_list} new = {column[0] for column in new_list}
for pos, (column, spec) in enumerate(old_list): pos = 0
for column, spec in old_list:
if column in new: if column in new:
old_dict[column] = pos, spec old_dict[column] = pos, spec
pos += 1
else: else:
q("DROP COLUMN " + column) q("DROP COLUMN " + column)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment