Skip to content

Commit

Permalink
fix: Avoid SQLAlchemy deprecation warning (meltano#6818)
Browse files Browse the repository at this point in the history
I'd like to thank whoever wrote the warning message for putting the exact solution within the message.

Closes meltano#6817
  • Loading branch information
WillDaSilva committed Sep 30, 2022
1 parent f0a396a commit 0fe8405
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import sqlalchemy as sa
from alembic import op
import sqlalchemy
from sqlalchemy import Column, MetaData, func, types
from sqlalchemy.engine.reflection import Inspector
from sqlalchemy.ext.declarative import declarative_base
Expand Down Expand Up @@ -332,7 +333,7 @@ def upgrade():
dialect_name = get_dialect_name()
max_string_length = max_string_length_for_dialect(dialect_name)
conn = op.get_bind()
inspector = Inspector.from_engine(conn)
inspector = sqlalchemy.inspect(conn)
if "state" in inspector.get_table_names():
op.drop_table("state")
op.create_table(
Expand Down

0 comments on commit 0fe8405

Please sign in to comment.