File size: 602 Bytes
c6abe34 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | -- Migration: Add tactical columns and FPS metadata
-- Run this in your Supabase SQL Editor
-- 1. Add tactical_x and tactical_y to detections table
ALTER TABLE detections
ADD COLUMN IF NOT EXISTS tactical_x REAL,
ADD COLUMN IF NOT EXISTS tactical_y REAL;
-- 2. Add fps to analysis_results table
ALTER TABLE analysis_results
ADD COLUMN IF NOT EXISTS fps REAL DEFAULT 30.0;
-- 3. (Optional) Backfill existing data from JSONB if desired
-- UPDATE detections
-- SET tactical_x = (keypoints->>'tactical_x')::real,
-- tactical_y = (keypoints->>'tactical_y')::real
-- WHERE keypoints ? 'tactical_x';
|