boctorj commented on code in PR #34344:
URL: https://github.com/apache/airflow/pull/34344#discussion_r1581498733


##########
airflow/migrations/versions/0129_2_8_0_add_clear_number_to_dag_run.py:
##########
@@ -38,15 +37,22 @@
 
 def upgrade():
     """Apply add cleared column to dagrun"""
-    with op.batch_alter_table("dag_run") as batch_op:
-        batch_op.add_column(
-            sa.Column(
-                "clear_number",
-                sa.Integer,
-                default=0,
-                nullable=False,
+    conn = op.get_bind()
+    if conn.dialect.name == "mssql":
+        with op.batch_alter_table("dag_run") as batch_op:
+            batch_op.add_column(sa.Column("clear_number", sa.Integer, 
default=0))
+            batch_op.alter_column("clear_number", existing_type=sa.Integer, 
nullable=False)

Review Comment:
   Thanks for fixing the issue but this doesn't fixed mssql.   Is there a 
reason why you forked the code to support this?   
   alter_column can take a 'server_default' value as well.



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