You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/25 14:42:35 UTC
[GitHub] [airflow] kaxil commented on a change in pull request #13892: Make Smart Sensors DB Migration idempotent
kaxil commented on a change in pull request #13892:
URL: https://github.com/apache/airflow/pull/13892#discussion_r563774796
##########
File path: airflow/migrations/versions/e38be357a868_update_schema_for_smart_sensor.py
##########
@@ -50,6 +51,11 @@ def sa_timestamp(): # noqa: D103
def upgrade(): # noqa: D103
conn = op.get_bind()
+ inspector = Inspector.from_engine(conn)
+ tables = inspector.get_table_names()
+ if "sensor_instance" in tables:
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org