Dundo777 commented on issue #13529:
URL: https://github.com/apache/airflow/issues/13529#issuecomment-758603790


   I prepared a docker compose with airflow master image and mysql 5.7 
configured to Europe/Zagreb timezone. And everything is working fine. 
   
   In this fresh Airflow installation task_instance table doesn't have default 
value setup for execution_date column.
   So looking at my migration scripts I noticed that in mysql dump sql script I 
have current_timestamp(6) as default value for execution_date in task_instance 
table.
   When I started upgrade to Airflow 2.0.0 I started from version 1.10.2. Is it 
possible that in some previous version of Airflow default timestamp value was 
setup but was later removed? Because we definitely didn't set that default 
value :)
   
   It would be good to check if this current_timestamp default value was setup 
in older versions of Airflow so that anyone that goes through same upgrade path 
knows what to look out for :) 
   Since it affects couple of tables and columns:
   - dag_code.last_updated
   - rendered_task_instance_fields.execution_date
   - sensor_instance.execution_date
   
   I attached default_timestamp_patch.sql inside of a zip that may be added to 
some patch or useful to someone that stumbles upon this issue. 
[default_timestamp_patch.zip](https://github.com/apache/airflow/files/5801813/default_timestamp_patch.zip)
   
   Regarding documentation, from the issue I was facing I got impression that 
database needs to be setup with UTC as default timezone and now with this fresh 
installation it's clear that that's not the case. So no need to do any changes 
in documentation, 
   
   As far as I'm concerned we can close this issue. Thanks for your help.
   
   
   
   


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


Reply via email to