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/02/23 08:49:25 UTC
[GitHub] [airflow] potiuk edited a comment on issue #14354: airflow version 2.0.1 === airflow db upgrade error
potiuk edited a comment on issue #14354:
URL: https://github.com/apache/airflow/issues/14354#issuecomment-784011866
Then you probably have `utf8mb4` encoding. In such case you need to specify `sql_engine_collation_for_ids=utf8mb3_general_ci` parameter in Airflow's config before migration. This is due to limitations of MySQL - when utf8mb4 is used, each character takes 4 bytes and it exceed the maximum key size.
We already have a chapter about it in the upcoming documentation (will be released with the next release of Airflow):
https://github.com/apache/airflow/blob/master/docs/apache-airflow/howto/set-up-database.rst#setting-up-a-mysql-database
```
In addition, you also should pay particular attention to MySQL's encoding. Although the utf8mb4 character set is more
and more popular for MySQL (actually, utf8mb4 becomes default character set in MySQL8.0), using the utf8mb4 encoding
requires additional setting in Airflow 2+ (See more details in #7570.). If you use utf8mb4 as character set, you should also set
sql_engine_collation_for_ids=utf8mb3_general_ci.
```
----------------------------------------------------------------
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