Files
quote-judge-studio-v1/db/migrations/002_quotejudge_current_columns.sql

11 lines
558 B
SQL

-- Ensure all columns used by the current QuoteJudge runtime exist before
-- legacy bridge migrations reference them. Additive and safe for existing DBs.
ALTER TABLE quote_comparisons
ADD COLUMN IF NOT EXISTS recommendation_vendor TEXT,
ADD COLUMN IF NOT EXISTS recommended_vendor TEXT,
ADD COLUMN IF NOT EXISTS result JSONB,
ADD COLUMN IF NOT EXISTS payload JSONB,
ADD COLUMN IF NOT EXISTS weighted_score NUMERIC(10,4),
ADD COLUMN IF NOT EXISTS score DOUBLE PRECISION,
ADD COLUMN IF NOT EXISTS normalized_total DOUBLE PRECISION;