You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/28 22:12:24 UTC

[GitHub] [airflow] mrshu commented on issue #13925: Duplicate entry with MySQL backend (AriFlow 2.0.0)

mrshu commented on issue #13925:
URL: https://github.com/apache/airflow/issues/13925#issuecomment-769433134


   @gedOHub We ran into a similar issue when trying to switch to Airflow 2.0. 
   
   Our setup seems to be similar to yours -- we also run Airflow in a Docker container. We found out that the problem was that in the `1.x` version that we ran previously we've executed `airflow initdb` on each startup of the Docker container in order to apply the migrations (i.e. to simplify switching to a new version of Airflow).
   
   It seems that in Airflow 2.0 the appropriate command would be `airflow db upgrade` as opposed to `airflow db init`, which ought to really be used just once. Swapping these two commands has fixed the issue for us.
   
   It's a long shot and may not really be the cause of the issue here but I am posting this in here so that others can potentially benefit from it when looking up a similar error message.
   
   cc @Lakeron


----------------------------------------------------------------
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:
users@infra.apache.org