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,26 @@
-- Migration: 005_lineup_scheme_data.sql
-- Lineup scheme data for nightly play-by-play collection.
-- Created: 2026-04-13
CREATE TABLE IF NOT EXISTS lineup_scheme_data (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
game_id TEXT NOT NULL,
game_date DATE NOT NULL,
team_id TEXT NOT NULL,
lineup_hash TEXT NOT NULL,
player_ids TEXT[] NOT NULL,
play_type TEXT NOT NULL,
possessions INTEGER DEFAULT 0,
points INTEGER DEFAULT 0,
fg_made INTEGER DEFAULT 0,
fg_attempted INTEGER DEFAULT 0,
turnovers INTEGER DEFAULT 0,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_ls_team ON lineup_scheme_data(team_id);
CREATE INDEX IF NOT EXISTS idx_ls_hash ON lineup_scheme_data(lineup_hash);
CREATE INDEX IF NOT EXISTS idx_ls_date ON lineup_scheme_data(game_date);
ALTER TABLE lineup_scheme_data ENABLE ROW LEVEL SECURITY;
CREATE POLICY ls_svc ON lineup_scheme_data FOR ALL USING (auth.role() = 'service_role');