feat: add scoped alpha sync and local self-correlation
This commit is contained in:
@@ -111,6 +111,15 @@ class ResearchTag(Base):
|
||||
tag: Mapped[str] = mapped_column(String(60), primary_key=True, index=True)
|
||||
|
||||
|
||||
class SelfCorrelation(Base):
|
||||
__tablename__ = "self_correlations"
|
||||
alpha_id: Mapped[str] = mapped_column(ForeignKey("alphas.id"), primary_key=True)
|
||||
region: Mapped[str | None] = mapped_column(String(50), index=True)
|
||||
result: Mapped[dict] = mapped_column(JSON)
|
||||
stale: Mapped[bool] = mapped_column(Boolean, default=False)
|
||||
calculated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=now)
|
||||
|
||||
|
||||
class Job(Base):
|
||||
__tablename__ = "sync_jobs"
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True)
|
||||
|
||||
Reference in New Issue
Block a user