From 874dee726315558f598cc6cad9724308ed589cc8 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Thu, 28 May 2026 12:37:39 -0400 Subject: [PATCH] fix(l1): add index=True to L1WalkSession.last_step_at model column Aligns the model with the migration (T6 review caught: migration creates ix_l1_walk_sessions_last_step_at but model annotation was missing, causing schema drift if Base.metadata.create_all is used in tests). Co-Authored-By: Claude Opus 4.7 --- backend/app/models/l1_walk_session.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/app/models/l1_walk_session.py b/backend/app/models/l1_walk_session.py index 9eb09edd..072fd587 100644 --- a/backend/app/models/l1_walk_session.py +++ b/backend/app/models/l1_walk_session.py @@ -128,6 +128,7 @@ class L1WalkSession(Base): DateTime(timezone=True), default=lambda: datetime.now(timezone.utc), onupdate=lambda: datetime.now(timezone.utc), + index=True, ) resolved_at: Mapped[Optional[datetime]] = mapped_column( DateTime(timezone=True), nullable=True,