Skip to content

Commit

Permalink
Testing: Resolve sqlalchemy.exc.SADeprecationWarning rucio#5522
Browse files Browse the repository at this point in the history
The `Inspector.has_table()` method replaces the `Engine.has_table()` method
since version 1.4.
  • Loading branch information
Joel Dierkes committed May 4, 2022
1 parent b7567c0 commit 6e4f994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rucio/db/sqla/util.py
Expand Up @@ -256,7 +256,7 @@ def is_old_db():
schema = config_get('database', 'schema', raise_exception=False)

# checks if alembic is being used by looking up the AlembicVersion table
if not get_engine().has_table(models.AlembicVersion.__tablename__, schema):
if not inspect(get_engine()).has_table(models.AlembicVersion.__tablename__, schema):
return False

s = get_session()
Expand Down

0 comments on commit 6e4f994

Please sign in to comment.