Lee-W commented on code in PR #64838:
URL: https://github.com/apache/airflow/pull/64838#discussion_r3152855816


##########
airflow-core/src/airflow/migrations/versions/0017_2_9_2_fix_inconsistency_between_ORM_and_migration_files.py:
##########
@@ -76,9 +78,9 @@ def upgrade():
     elif conn.dialect.name == "sqlite":
         # SQLite does not support DROP CONSTRAINT
         # We have to recreate the table without the constraint
-        conn.execute(sa.text("PRAGMA foreign_keys=off"))

Review Comment:
   keep `elif conn.dialect.name == "sqlite":.` is fine, but we don't need to 
reuse `disable_sqlite_fkeys` here. I feel the original check is better.



##########
airflow-core/src/airflow/migrations/versions/0017_2_9_2_fix_inconsistency_between_ORM_and_migration_files.py:
##########
@@ -76,9 +78,9 @@ def upgrade():
     elif conn.dialect.name == "sqlite":
         # SQLite does not support DROP CONSTRAINT
         # We have to recreate the table without the constraint
-        conn.execute(sa.text("PRAGMA foreign_keys=off"))

Review Comment:
   keep `elif conn.dialect.name == "sqlite":.` is correc, but we don't need to 
reuse `disable_sqlite_fkeys` here. I feel the original check is better.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to