feat(dolt): add shares_outstanding_date to fundamental_snapshots (026)
A1 carry-forward. The SEC cover-page share count (dei:EntityCommonStockSharesOutstanding) is reported "as of" its own date, which can differ from the fiscal period_end — store that date so market cap uses the right point-in-time count. Migration 026 edited in place (never run with data). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,7 @@ def upgrade() -> None:
|
||||
sa.Column("cash_and_st_investments", sa.Float(), nullable=True),
|
||||
sa.Column("total_debt", sa.Float(), nullable=True),
|
||||
sa.Column("shares_outstanding", sa.Float(), nullable=True),
|
||||
sa.Column("shares_outstanding_date", sa.Date(), nullable=True),
|
||||
sa.Column(
|
||||
"import_run_id",
|
||||
sa.Integer(),
|
||||
|
||||
@@ -64,6 +64,10 @@ class FundamentalSnapshot(Base):
|
||||
cash_and_st_investments: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
total_debt: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
shares_outstanding: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
# The cover-page share count (dei:EntityCommonStockSharesOutstanding) is
|
||||
# reported "as of" its own date, which can differ from period_end — store it
|
||||
# so market cap uses the right point-in-time count.
|
||||
shares_outstanding_date: Mapped[date | None] = mapped_column(Date, nullable=True)
|
||||
|
||||
import_run_id: Mapped[int | None] = mapped_column(
|
||||
ForeignKey("data_import_runs.id", ondelete="SET NULL"), nullable=True
|
||||
|
||||
Reference in New Issue
Block a user