Sessions 5-7a: 955 tests, deployment ready

This commit is contained in:
Kev
2026-06-08 18:35:13 -04:00
parent 06b82624a2
commit 1fa04dc776
371 changed files with 49366 additions and 955 deletions
@@ -0,0 +1,28 @@
-- Migration: 009_patch_supplement.sql
-- Supplement context columns on grade_outcomes + unconventional_factor_data table.
-- Created: 2026-04-13
-- ============================================================
-- Add supplement columns to grade_outcomes
-- ============================================================
ALTER TABLE grade_outcomes ADD COLUMN IF NOT EXISTS coaching_context JSONB;
ALTER TABLE grade_outcomes ADD COLUMN IF NOT EXISTS redistribution_context JSONB;
ALTER TABLE grade_outcomes ADD COLUMN IF NOT EXISTS evolution_flag BOOLEAN DEFAULT FALSE;
ALTER TABLE grade_outcomes ADD COLUMN IF NOT EXISTS alt_line_opportunity JSONB;
ALTER TABLE grade_outcomes ADD COLUMN IF NOT EXISTS unconventional_factors JSONB;
-- ============================================================
-- Unconventional Factor Data (daily collection for validation)
-- ============================================================
CREATE TABLE IF NOT EXISTS unconventional_factor_data (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
factor_name TEXT NOT NULL,
game_id TEXT NOT NULL,
game_date DATE NOT NULL,
factor_value JSONB NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_ufd_factor ON unconventional_factor_data(factor_name);
CREATE INDEX IF NOT EXISTS idx_ufd_date ON unconventional_factor_data(game_date);
ALTER TABLE unconventional_factor_data ENABLE ROW LEVEL SECURITY;
CREATE POLICY ufd_svc ON unconventional_factor_data FOR ALL USING (auth.role() = 'service_role');