abhishekbhakat commented on code in PR #34344:
URL: https://github.com/apache/airflow/pull/34344#discussion_r1581731440
##########
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:
Discussed here:
https://github.com/apache/airflow/pull/34335/files/ae9920a4be57acf30ee6a7923d3a1e4708a1c36d
Gist: _Issue was with downgrade._
--
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]