Merge "Replace "Inspector.from_engine()" with "sqlalchemy.inspect()""
This commit is contained in:
commit
57ca1a3d54
|
@ -47,8 +47,7 @@ def get_inspector():
|
|||
if _INSPECTOR:
|
||||
return _INSPECTOR
|
||||
else:
|
||||
bind = op.get_bind()
|
||||
_INSPECTOR = sa.engine.reflection.Inspector.from_engine(bind)
|
||||
_INSPECTOR = sa.inspect(op.get_bind())
|
||||
|
||||
return _INSPECTOR
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ def upgrade():
|
|||
|
||||
|
||||
def clear_constraints_and_foreign():
|
||||
inspect = sa.engine.reflection.Inspector.from_engine(op.get_bind())
|
||||
inspect = sa.inspect(op.get_bind())
|
||||
foreign_keys = inspect.get_foreign_keys(PF_TABLE_NAME)
|
||||
migration.remove_foreign_keys(PF_TABLE_NAME,
|
||||
foreign_keys)
|
||||
|
|
Loading…
Reference in New Issue