Only alter the SA objects after running the visitor, so the visitor may inspect
This commit is contained in:
parent
b2db52ff4e
commit
9c9fe2fc24
@ -559,11 +559,10 @@ populated with defaults
|
|||||||
if table is not None:
|
if table is not None:
|
||||||
self.table = table
|
self.table = table
|
||||||
engine = self.table.bind
|
engine = self.table.bind
|
||||||
if self.alter_metadata:
|
|
||||||
self.remove_from_table(self.table, unset_table=False)
|
|
||||||
visitorcallable = get_engine_visitor(engine, 'columndropper')
|
visitorcallable = get_engine_visitor(engine, 'columndropper')
|
||||||
engine._run_visitor(visitorcallable, self, connection, **kwargs)
|
engine._run_visitor(visitorcallable, self, connection, **kwargs)
|
||||||
if self.alter_metadata:
|
if self.alter_metadata:
|
||||||
|
self.remove_from_table(self.table, unset_table=False)
|
||||||
self.table = None
|
self.table = None
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user