This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-9-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-9-test by this push:
new fd87589c9e Update trigger kwargs migration to specify
existing_nullable (#39361)
fd87589c9e is described below
commit fd87589c9e0d9a6afd6c6d656844e4828cf54511
Author: Ephraim Anierobi <[email protected]>
AuthorDate: Thu May 2 09:56:02 2024 +0100
Update trigger kwargs migration to specify existing_nullable (#39361)
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
(cherry picked from commit 1d504ca924309efd4e7ac2cdc2aacd1ff18b2227)
---
airflow/migrations/versions/0140_2_9_0_update_trigger_kwargs_type.py | 2 +-
docs/apache-airflow/img/airflow_erd.sha256 | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/airflow/migrations/versions/0140_2_9_0_update_trigger_kwargs_type.py
b/airflow/migrations/versions/0140_2_9_0_update_trigger_kwargs_type.py
index 2d57686e43..111781ce8f 100644
--- a/airflow/migrations/versions/0140_2_9_0_update_trigger_kwargs_type.py
+++ b/airflow/migrations/versions/0140_2_9_0_update_trigger_kwargs_type.py
@@ -50,7 +50,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()
diff --git a/docs/apache-airflow/img/airflow_erd.sha256
b/docs/apache-airflow/img/airflow_erd.sha256
index e02a7d8745..0c59a6af75 100644
--- a/docs/apache-airflow/img/airflow_erd.sha256
+++ b/docs/apache-airflow/img/airflow_erd.sha256
@@ -1 +1 @@
-818cbc5af55096456b556d62e73eb5d797001969a04256f4a99e097fe189855d
\ No newline at end of file
+4a8aed085996d893909588dabe45906213629a545bbce7b551189c85121f88bd
\ No newline at end of file