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



##########
File path: 
airflow/migrations/versions/e9304a3141f0_make_xcom_pkey_columns_non_nullable.py
##########
@@ -48,14 +48,11 @@ def downgrade():
     """Unapply make xcom pkey columns non-nullable"""
     conn = op.get_bind()
     with op.batch_alter_table('xcom') as bop:
-        if conn.dialect.name == 'mssql':
-            bop.drop_constraint('pk_xcom', 'primary')
-
         # regardless of what the model defined, the `key` and `execution_date`
-        # columns were always non-nullable for sqlite and postgres, so leave 
them alone
+        # columns were always non-nullable for mysql, sqlite and postgres, so 
leave them alone

Review comment:
       I just experimented a bit here and I found what I did wrong last time. 
If you dont get the charset/collation set correctly, `db init` fails, then do a 
`db upgrade` and it "finishes". And in this case, you get a nullable column!
   
   Gotta love no transactions on ddl for mysql :)




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