feat: multiple updates - alerts, auth, sectors, rotation service, financials ingestion, task specs, and agent framework
This commit is contained in:
@@ -193,3 +193,31 @@ CREATE INDEX IF NOT EXISTS idx_alerts_watchlist_id ON alerts (watchlist_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_sec_filings_ticker ON sec_filings (ticker);
|
||||
CREATE INDEX IF NOT EXISTS idx_insider_trades_ticker ON insider_trades (ticker);
|
||||
CREATE INDEX IF NOT EXISTS idx_sector_rotations_date ON sector_rotations (detection_date DESC);
|
||||
|
||||
-- Financials table (income statement / balance sheet / cash flow snapshots)
|
||||
CREATE TABLE IF NOT EXISTS financials (
|
||||
ticker VARCHAR(20) NOT NULL,
|
||||
filing_date DATE NOT NULL,
|
||||
period VARCHAR(10) NOT NULL,
|
||||
period_end DATE,
|
||||
revenue NUMERIC(18,2),
|
||||
cost_of_revenue NUMERIC(18,2),
|
||||
gross_profit NUMERIC(18,2),
|
||||
operating_expense NUMERIC(18,2),
|
||||
operating_income NUMERIC(18,2),
|
||||
net_income NUMERIC(18,2),
|
||||
eps_basic NUMERIC(12,4),
|
||||
eps_diluted NUMERIC(12,4),
|
||||
total_assets NUMERIC(20,2),
|
||||
total_liabilities NUMERIC(20,2),
|
||||
total_equity NUMERIC(20,2),
|
||||
operating_cashflow NUMERIC(18,2),
|
||||
free_cashflow NUMERIC(18,2),
|
||||
debt_to_equity NUMERIC(8,4),
|
||||
roe NUMERIC(8,4),
|
||||
roa NUMERIC(8,4),
|
||||
created_at TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (ticker, filing_date, period)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_financials_ticker ON financials (ticker);
|
||||
CREATE INDEX IF NOT EXISTS idx_financials_period ON financials (period);
|
||||
|
||||
Reference in New Issue
Block a user