-- Migration 021: Add metadata column to ai_insights for storing debug info
-- Date: 2026-03-26
-- Purpose: Store resolved placeholder values with descriptions for transparency

ALTER TABLE ai_insights ADD COLUMN IF NOT EXISTS metadata JSONB DEFAULT NULL;

COMMENT ON COLUMN ai_insights.metadata IS 'Debug info: resolved placeholders, descriptions, etc.';
