anshuksi282-ksolves commented on code in PR #56476: URL: https://github.com/apache/airflow/pull/56476#discussion_r2417738324
########## airflow-core/src/airflow/models/serialized_dag.py: ########## @@ -280,17 +281,15 @@ class SerializedDagModel(Base): """ __tablename__ = "serialized_dag" - id: Mapped[str] = mapped_column(UUIDType(binary=False), primary_key=True, default=uuid6.uuid7) - dag_id: Mapped[str] = mapped_column(String(ID_LEN), nullable=False) - _data: Mapped[dict | None] = mapped_column( + id = Column(UUIDType(binary=False), primary_key=True, default=uuid6.uuid7) + dag_id = Column(String(ID_LEN), nullable=False) + _data = Column( "data", sqlalchemy_jsonfield.JSONField(json=json).with_variant(JSONB, "postgresql"), nullable=True ) - _data_compressed: Mapped[bytes | None] = mapped_column("data_compressed", LargeBinary, nullable=True) - created_at: Mapped[UtcDateTime] = mapped_column(UtcDateTime, nullable=False, default=timezone.utcnow) - last_updated: Mapped[UtcDateTime] = mapped_column( - UtcDateTime, nullable=False, default=timezone.utcnow, onupdate=timezone.utcnow - ) - dag_hash: Mapped[str] = mapped_column(String(32), nullable=False) + _data_compressed = Column("data_compressed", LargeBinary, nullable=True) + created_at = Column(UtcDateTime, nullable=False, default=timezone.utcnow) + last_updated = Column(UtcDateTime, nullable=False, default=timezone.utcnow, onupdate=timezone.utcnow) + dag_hash = Column(String(32), nullable=False) Review Comment: Hi @ashb, Thanks for the feedback! Earlier, I had replaced the column definitions with mapped_column, but after @ephraimbuddy suggested removing unnecessary changes, I reverted that in a subsequent commit. The current PR now only includes the dynamic DAG serialization fix, without unrelated column changes, so it’s safe to backport to 3.1.1. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org