iting0321 commented on code in PR #64838:
URL: https://github.com/apache/airflow/pull/64838#discussion_r3106830183
##########
airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:
##########
@@ -105,13 +104,12 @@ def _drop_fkey_if_exists(table, constraint_name):
if dialect_name == "sqlite":
# SQLite requires foreign key constraints to be disabled during batch
operations
- conn.execute(text("PRAGMA foreign_keys=OFF"))
- try:
- with op.batch_alter_table(table, schema=None) as batch_op:
- batch_op.drop_constraint(op.f(constraint_name),
type_="foreignkey")
- except ValueError:
- pass
- conn.execute(text("PRAGMA foreign_keys=ON"))
+ with disable_sqlite_fkeys(op):
Review Comment:
fixed
--
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]