pierrejeambrun commented on code in PR #56330:
URL: https://github.com/apache/airflow/pull/56330#discussion_r2433111037
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -2115,11 +2122,13 @@ class DagRunNote(Base):
__tablename__ = "dag_run_note"
- user_id = Column(String(128), nullable=True)
- dag_run_id = Column(Integer, primary_key=True, nullable=False)
- content = Column(String(1000).with_variant(Text(1000), "mysql"))
- created_at = Column(UtcDateTime, default=timezone.utcnow, nullable=False)
- updated_at = Column(UtcDateTime, default=timezone.utcnow,
onupdate=timezone.utcnow, nullable=False)
+ user_id: Mapped[str | None] = mapped_column(String(128), nullable=True)
+ dag_run_id: Mapped[int] = mapped_column(Integer, primary_key=True,
nullable=False)
+ content: Mapped[str] = mapped_column(String(1000).with_variant(Text(1000),
"mysql"))
Review Comment:
Content used to be nullable. While here it is not nullable (inferred from
type annotation). This is why tests are failing. Similarly for TI note content.
```suggestion
content: Mapped[str | None] =
mapped_column(String(1000).with_variant(Text(1000), "mysql"))
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]