/**
 * Migration: Add HTML body column to email templates
 * @ai-summary Non-breaking migration for future HTML template support
 * @ai-context Existing plain text templates auto-convert to HTML
 */

-- Add optional html_body column for custom HTML templates (future enhancement)
ALTER TABLE email_templates
ADD COLUMN html_body TEXT DEFAULT NULL;

-- Add comment explaining the column purpose
COMMENT ON COLUMN email_templates.html_body IS
  'Optional custom HTML body. If NULL, the plain text body will be auto-converted to HTML with base layout.';

-- No data updates needed - existing templates continue to work
-- The system will auto-convert plain text body to HTML using renderEmailHtml()
