-- Migration 007: Add cli_yaml and cli_raw fields
-- Split CLI field into structured YAML and raw Markdown

ALTER TABLE peripherals ADD COLUMN cli_yaml TEXT;
ALTER TABLE peripherals ADD COLUMN cli_raw TEXT;

-- Optional: Migrate existing cli data to cli_raw for backward compatibility
UPDATE peripherals SET cli_raw = cli WHERE cli IS NOT NULL AND cli != '';
