Copilot commented on code in PR #62234:
URL: https://github.com/apache/airflow/pull/62234#discussion_r2926164370


##########
airflow-core/src/airflow/migrations/versions/0047_3_0_0_add_dag_versioning.py:
##########
@@ -72,6 +74,14 @@ def upgrade():
     )
 
     with ignore_sqlite_value_error(), op.batch_alter_table("dag_code") as 
batch_op:
+        if dialect_name == "mysql":
+            # MySQL can't drop a primary key while an AUTO_INCREMENT column 
depends on it.
+            batch_op.alter_column(
+                "fileloc_hash",
+                existing_type=sa.BigInteger(),
+                existing_nullable=False,
+                autoincrement=False,
+            )

Review Comment:
   `op.get_bind()` can be `None` when generating SQL in offline mode 
(`--show-sql-only`), so `op.get_bind().dialect.name` will raise and break 
offline migration generation. Use an offline-safe dialect lookup (e.g. 
`alembic.context.get_context().dialect.name` or the new 
`airflow.migrations.utils.get_dialect_name(op)` helper) instead of 
dereferencing `op.get_bind()` directly.



##########
providers/edge3/docs/migrations-ref.rst:
##########
@@ -0,0 +1,48 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+Reference for Database Migrations
+'''''''''''''''''''''''''''''''''
+
+Here's the list of all the Database Migrations that are executed via when you 
run ``airflow db migrate``.
+
+.. warning::
+
+   Those migration details are mostly used here to make the users aware when 
and what kind of migrations
+   will be executed during migrations between specific FAB provider versions. 
The intention here is that the

Review Comment:
   This Edge3 migration reference page still refers to “specific FAB provider 
versions”, which looks like a copy/paste from the FAB docs and is misleading 
for Edge3 users. Update the wording to refer to Edge3 provider versions (or 
provider versions generically).
   ```suggestion
      will be executed during migrations between specific Edge3 provider 
versions. The intention here is that the
   ```



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