Skip to content

Commit

Permalink
Update trigger kwargs migration to specify existing_nullable (#39361)
Browse files Browse the repository at this point in the history
Without the existing_nullable set during alter_column, MySQL will set it to Null.
See https://alembic.sqlalchemy.org/en/latest/ops.html#alembic.operations.Operations.alter_column.params.existing_nullable
  • Loading branch information
ephraimbuddy committed May 2, 2024
1 parent 4910c04 commit 1d504ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_session() -> sa.orm.Session:
def upgrade():
"""Update trigger kwargs type to string and encrypt."""
with op.batch_alter_table("trigger") as batch_op:
batch_op.alter_column("kwargs", type_=sa.Text())
batch_op.alter_column("kwargs", type_=sa.Text(), existing_nullable=False)

if not context.is_offline_mode():
session = get_session()
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/img/airflow_erd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7020f6f66186b4e7fb327acd624c615a8fd1245107c9c78a240fdf6dd86da0e4
2e81e413572223fb23ad87086f9f3684363278b0b88400071c19688bc2ce9136
4 changes: 2 additions & 2 deletions docs/apache-airflow/img/airflow_erd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1d504ca

Please sign in to comment.