feat: add report versioning support with report_group_id

This commit is contained in:
Anish Sarkar 2026-02-12 03:19:38 +05:30
parent e7a73d0570
commit adeef35443
10 changed files with 344 additions and 48 deletions

View file

@ -1046,6 +1046,10 @@ class Report(BaseModel, TimestampMixin):
)
search_space = relationship("SearchSpace", back_populates="reports")
# Versioning: reports sharing the same report_group_id are versions of the same report.
# For v1, report_group_id = the report's own id (set after insert).
report_group_id = Column(Integer, nullable=True, index=True)
thread_id = Column(
Integer,
ForeignKey("new_chat_threads.id", ondelete="SET NULL"),