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/10/28 11:11:12 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #19268: Fix MySQL db migration with default encoding/collation

kaxil commented on a change in pull request #19268:
URL: https://github.com/apache/airflow/pull/19268#discussion_r738284240



##########
File path: airflow/migrations/versions/7b2661a43ba3_taskinstance_keyed_to_dagrun.py
##########
@@ -196,6 +196,9 @@ def upgrade():
         if dialect_name == "mysql":
             # Mysql creates an index and a constraint -- we have to drop both
             batch_op.drop_index('task_reschedule_dag_task_date_fkey')
+            batch_op.alter_column(
+                'dag_id', existing_type=sa.String(length=ID_LEN), type_=string_id_col_type, nullable=False
+            )

Review comment:
       That is already used in `type_=string_id_col_type`
   
   https://github.com/apache/airflow/blob/efe2626c66a0d936333a9e99b7f5a34037588213/airflow/migrations/versions/7b2661a43ba3_taskinstance_keyed_to_dagrun.py#L111




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