ephraimbuddy commented on a change in pull request #21273:
URL: https://github.com/apache/airflow/pull/21273#discussion_r803366626



##########
File path: 
airflow/migrations/versions/7b2661a43ba3_taskinstance_keyed_to_dagrun.py
##########
@@ -337,7 +337,7 @@ def downgrade():
         batch_op.drop_constraint('task_instance_pkey', type_='primary')
         batch_op.alter_column('execution_date', existing_type=dt_type, 
existing_nullable=True, nullable=False)
         batch_op.alter_column(
-            'dag_id', existing_type=string_id_col_type, 
existing_nullable=True, nullable=True
+            'dag_id', existing_type=string_id_col_type, 
existing_nullable=True, nullable=False

Review comment:
       MSSQL doesn't like it:
   ```
   sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', 
"[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot define 
PRIMARY KEY constraint on nullable column in table 'task_instance'. (8111) 
(SQLExecDirectW)")
   [SQL: ALTER TABLE task_instance ADD CONSTRAINT task_instance_pkey PRIMARY 
KEY (dag_id, task_id, execution_date)]
   ```




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