ashb commented on a change in pull request #5418: [AIRFLOW-3036] Updates for 
MYSQL migrations
URL: https://github.com/apache/airflow/pull/5418#discussion_r293965262
 
 

 ##########
 File path: airflow/migrations/versions/0e2a74e0fc9f_add_time_zone_awareness.py
 ##########
 @@ -153,13 +151,22 @@ def upgrade():
         )
 
         op.alter_column(
-            table_name="xcom", column_name="timestamp", 
type_=mysql.TIMESTAMP(fsp=6)
+            table_name="xcom",
+            column_name="timestamp",
+            type_=mysql.TIMESTAMP(fsp=6),
+            nullable=False,
+            server_default=sa.text('CURRENT_TIMESTAMP(6)')
         )
         op.alter_column(
             table_name="xcom",
             column_name="execution_date",
             type_=mysql.TIMESTAMP(fsp=6),
+            nullable=False,
+            server_default=sa.text('CURRENT_TIMESTAMP(6)')
         )
+        conn.execute("alter table task_instance alter column execution_date 
drop default")
 
 Review comment:
   Doesn't this undo the change made on L135? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to