Skip to content

Commit

Permalink
Fix MySQL db migration with default encoding/collation (#19268)
Browse files Browse the repository at this point in the history
(cherry picked from commit e76a69b)
  • Loading branch information
jedcunningham committed Nov 3, 2021
1 parent 7a14324 commit 44caa7e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,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
)
batch_op.drop_index('idx_task_reschedule_dag_task_date')

# Then update the new column by selecting the right value from DagRun
Expand Down

0 comments on commit 44caa7e

Please sign in to comment.