jedcunningham commented on code in PR #41804:
URL: https://github.com/apache/airflow/pull/41804#discussion_r1765856918


##########
airflow/cli/commands/db_command.py:
##########
@@ -136,21 +144,30 @@ def migratedb(args):
         print(f"Performing upgrade to the metadata database 
{settings.engine.url!r}")
     else:
         print("Generating sql for upgrade -- upgrade commands will *not* be 
submitted.")
-
-    db.upgradedb(
-        to_revision=to_revision,
-        from_revision=from_revision,
-        show_sql_only=args.show_sql_only,
-        reserialize_dags=args.reserialize_dags,
-    )
+    if reserialize_dags:
+        command(
+            to_revision=to_revision,
+            from_revision=from_revision,
+            show_sql_only=args.show_sql_only,
+            reserialize_dags=True,
+        )
+    else:
+        command(
+            to_revision=to_revision,
+            from_revision=from_revision,
+            show_sql_only=args.show_sql_only,
+        )

Review Comment:
   ```suggestion
       command(
           to_revision=to_revision,
           from_revision=from_revision,
           show_sql_only=args.show_sql_only,
           reserialize_dags=reserialize_dags,
       )
   ```



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