add next_fire_at to automation_triggers and croniter dep

This commit is contained in:
CREDO23 2026-05-27 17:55:58 +02:00
parent 861b91004d
commit f08b316441
4 changed files with 33 additions and 0 deletions

View file

@ -46,6 +46,11 @@ class AutomationTrigger(BaseModel, TimestampMixin):
last_fired_at = Column(TIMESTAMP(timezone=True), nullable=True)
# Precomputed next fire moment in UTC; advanced after each fire by the
# schedule tick. NULL means the trigger has never been scheduled (the
# tick self-heals on first sight). Manual triggers leave this NULL.
next_fire_at = Column(TIMESTAMP(timezone=True), nullable=True)
automation = relationship("Automation", back_populates="triggers")
runs = relationship(
"AutomationRun",