diff --git a/airflow/models/xcom.py b/airflow/models/xcom.py index 45208e353bdc1..5b6f83f4d59b2 100644 --- a/airflow/models/xcom.py +++ b/airflow/models/xcom.py @@ -34,6 +34,7 @@ select, text, ) +from sqlalchemy.dialects import postgresql from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.orm import Query, reconstructor, relationship @@ -79,7 +80,7 @@ class BaseXCom(TaskInstanceDependencies, LoggingMixin): dag_id = Column(String(ID_LEN, **COLLATION_ARGS), nullable=False) run_id = Column(String(ID_LEN, **COLLATION_ARGS), nullable=False) - value = Column(JSON) + value = Column(JSON().with_variant(postgresql.JSONB, "postgresql")) timestamp = Column(UtcDateTime, default=timezone.utcnow, nullable=False) __table_args__ = (