XD-DENG commented on a change in pull request #13892:
URL: https://github.com/apache/airflow/pull/13892#discussion_r563764874
##########
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:
nit: good to use single quotes to keep consistent with the whole script?
The same for the change in `downgrade()`
##########
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:
👍
----------------------------------------------------------------
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:
[email protected]