feat: show update last_scan_at for any update

This commit is contained in:
arkohut 2024-07-29 18:25:24 +08:00
parent 7e7fa02e23
commit 18d30e6567

View File

@ -60,7 +60,7 @@ class EntityModel(Base):
file_last_modified_at: Mapped[datetime] = mapped_column(DateTime, nullable=False)
file_type: Mapped[str] = mapped_column(String, nullable=False)
file_type_group: Mapped[str] = mapped_column(String, nullable=False)
last_scan_at: Mapped[datetime | None] = mapped_column(DateTime, nullable=True)
last_scan_at: Mapped[datetime | None] = mapped_column(DateTime, onupdate=func.now(), nullable=True)
library_id: Mapped[int] = mapped_column(
Integer, ForeignKey("libraries.id"), nullable=False
)