-- Fix Category Icons - Add proper Font Awesome icons
USE wakatraffic;

UPDATE categories SET icon = 'fab fa-instagram' WHERE LOWER(name) LIKE '%instagram%';
UPDATE categories SET icon = 'fab fa-facebook-f' WHERE LOWER(name) LIKE '%facebook%';
UPDATE categories SET icon = 'fab fa-twitter' WHERE LOWER(name) LIKE '%twitter%' OR LOWER(name) LIKE '%x%';
UPDATE categories SET icon = 'fab fa-youtube' WHERE LOWER(name) LIKE '%youtube%';
UPDATE categories SET icon = 'fab fa-tiktok' WHERE LOWER(name) LIKE '%tiktok%';
UPDATE categories SET icon = 'fab fa-spotify' WHERE LOWER(name) LIKE '%spotify%';
UPDATE categories SET icon = 'fab fa-telegram' WHERE LOWER(name) LIKE '%telegram%';
UPDATE categories SET icon = 'fab fa-whatsapp' WHERE LOWER(name) LIKE '%whatsapp%';
UPDATE categories SET icon = 'fab fa-linkedin' WHERE LOWER(name) LIKE '%linkedin%';
UPDATE categories SET icon = 'fab fa-pinterest' WHERE LOWER(name) LIKE '%pinterest%';
UPDATE categories SET icon = 'fab fa-snapchat' WHERE LOWER(name) LIKE '%snapchat%';
UPDATE categories SET icon = 'fab fa-reddit' WHERE LOWER(name) LIKE '%reddit%';

-- Show results
SELECT id, name, icon, status FROM categories ORDER BY name;
