manish1337 commented on code in PR #73920:
URL: https://github.com/apache/airflow/pull/73920#discussion_r4750213796
##########
airflow-core/src/airflow/migrations/env.py:
##########
@@ -46,6 +54,8 @@ def include_object(_, name, type_, *args):
# represented in the SQLAlchemy model; hide them from autogenerate.
if type_ == "index" and name in _POSTGRES_ONLY_INDEXES:
return False
+ if type_ == "index" and name in _NOT_ON_MYSQL_INDEXES and
context.get_context().dialect.name == "mysql":
+ return False
Review Comment:
This is covered by test_has_pending_upgrade_ops, which runs alembic check
through include_object. On MySQL, removing this branch makes it fail with
add_index idx_dag_run_queued_dags, and CI runs it against MySQL. On Postgres
and SQLite the index exists in both the model and the DB, so the filter has
nothing to change there.
--
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]