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/09/23 08:50:53 UTC

[GitHub] [airflow] BasPH commented on issue #18457: Running `airflow db init` raises OperationalError on SQL: ALTER TABLE xcom DROP COLUMN id

BasPH commented on issue #18457:
URL: https://github.com/apache/airflow/issues/18457#issuecomment-925620234


   As the error says "Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set". This setting was apparently introduced in MySQL 8.0.13 and is OFF by default, so I guess you have enabled it.
   
   The XCom table does include a primary key (dag_id, task_id, key, execution_date), but the migration script first removes the (old) id column, which fails in combination with sql_require_primary_key=ON. Is it possible to disable it temporarily, and enable afterwards?
   
   On the Airflow side, would you be willing to add a check for this setting and/or add this information to the docs?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org