-- ============================================================
-- Learnillion — Migration: enrich skill_paths with icon, descriptions, category
-- MariaDB / MySQL compatible
-- ============================================================

ALTER TABLE `skill_paths` ADD COLUMN `icon` VARCHAR(20) DEFAULT NULL AFTER `slug`;
ALTER TABLE `skill_paths` ADD COLUMN `short_description` VARCHAR(280) DEFAULT NULL AFTER `icon`;
ALTER TABLE `skill_paths` ADD COLUMN `full_description` TEXT DEFAULT NULL AFTER `short_description`;
ALTER TABLE `skill_paths` ADD COLUMN `category_id` INT UNSIGNED NULL AFTER `full_description`;

ALTER TABLE `skill_paths` ADD INDEX `idx_sp_category` (`category_id`);
ALTER TABLE `skill_paths`
  ADD CONSTRAINT `fk_skill_paths_category`
  FOREIGN KEY (`category_id`) REFERENCES `categories`(`id`) ON DELETE SET NULL;

-- Seed icons + descriptions for the default skill paths
UPDATE skill_paths SET icon = '📈', short_description = 'Core marketing skills every growth practitioner needs.', full_description = 'Build a foundation in paid acquisition, landing page optimization, and measurement. This path walks through the full funnel from awareness to conversion with hands-on, repeatable tactics.' WHERE slug = 'growth-marketing-fundamentals';
UPDATE skill_paths SET icon = '🎯', short_description = 'Run profitable Google Ads campaigns from day one.', full_description = 'From keyword research to bid strategy and ad copy that converts. Learn how to diagnose failing campaigns, cut wasted spend, and scale what works.' WHERE slug = 'google-ads-mastery';
UPDATE skill_paths SET icon = '🔍', short_description = 'Get your content found without paying for clicks.', full_description = 'Search engine optimization from keyword research to on-page structure and link building. Covers both technical SEO and content strategy, with real examples of what ranks in 2026.' WHERE slug = 'seo-from-scratch';
UPDATE skill_paths SET icon = '✉️', short_description = 'Write cold emails people actually reply to.', full_description = 'Prospecting, personalization, copywriting, and follow-up cadences. Learn the exact frameworks top SDRs use to book meetings from cold outreach.' WHERE slug = 'cold-outreach';
UPDATE skill_paths SET icon = '🧭', short_description = 'Find problems worth solving before you build.', full_description = 'User interviews, jobs-to-be-done, problem framing, and prioritization. Build the discovery muscle that separates great PMs from feature factories.' WHERE slug = 'product-discovery';
UPDATE skill_paths SET icon = '🚀', short_description = 'Ship weekly without breaking things.', full_description = 'Small batches, continuous deployment, feature flags, and incident response. Practical techniques for keeping velocity high while staying stable.' WHERE slug = 'shipping-faster';
UPDATE skill_paths SET icon = '🎨', short_description = 'Build a design system your whole team can use.', full_description = 'Tokens, components, documentation, and governance. Go from scattered UI to a single source of truth that scales across your product.' WHERE slug = 'design-systems-101';
UPDATE skill_paths SET icon = '💰', short_description = 'Raise your first (or next) round with confidence.', full_description = 'Story, metrics, deck structure, investor outreach, and negotiation. The complete playbook for founders raising seed through Series B.' WHERE slug = 'fundraising-playbook';
UPDATE skill_paths SET icon = '👋', short_description = 'Set yourself up for success as a new manager.', full_description = 'Your first three months as a people manager: 1:1s, feedback, delegation, and building trust. Everything you wish someone told you before you got promoted.' WHERE slug = 'first-90-days-manager';
UPDATE skill_paths SET icon = '🧠', short_description = 'Do focused, high-quality work in a noisy world.', full_description = 'Attention, flow states, scheduling, and distraction management. Reclaim four hours a day for the work that actually matters.' WHERE slug = 'deep-work';
UPDATE skill_paths SET icon = '🗄️', short_description = 'Query your own data without asking an engineer.', full_description = 'SELECT, JOIN, GROUP BY, window functions, and common analyst patterns. Written for marketers, PMs, and ops people who want data answers fast.' WHERE slug = 'sql-for-non-engineers';
UPDATE skill_paths SET icon = '🏗️', short_description = 'Think about scale, reliability, and tradeoffs.', full_description = 'Load balancers, caching, queues, sharding, CAP theorem in practice. Everything you need to pass a system design interview or lead an architecture conversation.' WHERE slug = 'system-design-basics';
UPDATE skill_paths SET icon = '🤝', short_description = 'Get better outcomes in any deal or conversation.', full_description = 'BATNA, anchoring, concessions, reading signals, and de-escalation. Negotiation techniques that work for salary talks, vendor deals, and everyday conversations.' WHERE slug = 'negotiation-essentials';
UPDATE skill_paths SET icon = '💵', short_description = 'Build wealth with boring, reliable fundamentals.', full_description = 'Budgeting, emergency funds, index investing, tax-advantaged accounts, and debt management. The financial habits that compound over decades.' WHERE slug = 'money-habits';
