vincbeck commented on code in PR #55954:
URL: https://github.com/apache/airflow/pull/55954#discussion_r2382866608


##########
airflow-core/src/airflow/models/backfill.py:
##########
@@ -117,23 +127,27 @@ class Backfill(Base):
 
     __tablename__ = "backfill"
 
-    id = Column(Integer, primary_key=True, autoincrement=True)
-    dag_id = Column(StringID(), nullable=False)
-    from_date = Column(UtcDateTime, nullable=False)
-    to_date = Column(UtcDateTime, nullable=False)
-    dag_run_conf = Column(JSONField(json=json), nullable=False, default={})
-    is_paused = Column(Boolean, default=False)
+    id: Mapped[int] = mapped_column(Integer, primary_key=True, 
autoincrement=True)
+    dag_id: Mapped[str] = mapped_column(StringID(), nullable=False)
+    from_date: Mapped[datetime] = mapped_column(UtcDateTime, nullable=False)
+    to_date: Mapped[datetime] = mapped_column(UtcDateTime, nullable=False)
+    dag_run_conf = mapped_column(JSONField(json=json), nullable=False, 
default={})
+    is_paused: Mapped[bool] = mapped_column(Boolean, default=False)
     """
     Controls whether new dag runs will be created for this backfill.
 
     Does not pause existing dag runs.
     """
-    reprocess_behavior = Column(StringID(), nullable=False, 
default=ReprocessBehavior.NONE)
-    max_active_runs = Column(Integer, default=10, nullable=False)
-    created_at = Column(UtcDateTime, default=timezone.utcnow, nullable=False)
-    completed_at = Column(UtcDateTime, nullable=True)
-    updated_at = Column(UtcDateTime, default=timezone.utcnow, 
onupdate=timezone.utcnow, nullable=False)
-    triggering_user_name = Column(
+    reprocess_behavior: Mapped[str] = mapped_column(
+        StringID(), nullable=False, default=ReprocessBehavior.NONE
+    )
+    max_active_runs: Mapped[int] = mapped_column(Integer, default=10, 
nullable=False)
+    created_at: Mapped[datetime] = mapped_column(UtcDateTime, 
default=timezone.utcnow, nullable=False)
+    completed_at: Mapped[datetime | None] = mapped_column(UtcDateTime, 
nullable=True)

Review Comment:
   Noted and very good point. We'll do this clean up once we migrated to 2.0



-- 
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]

Reply via email to