USE mtplayyyy;

-- Add site branding columns to admin_ac
ALTER TABLE admin_ac ADD COLUMN IF NOT EXISTS site_name varchar(100) NOT NULL DEFAULT 'ColorKing';
ALTER TABLE admin_ac ADD COLUMN IF NOT EXISTS logo_url varchar(255) NOT NULL DEFAULT '';
ALTER TABLE admin_ac ADD COLUMN IF NOT EXISTS primary_color varchar(20) NOT NULL DEFAULT '#f95959';
ALTER TABLE admin_ac ADD COLUMN IF NOT EXISTS secondary_color varchar(20) NOT NULL DEFAULT '#ff9a3c';
ALTER TABLE admin_ac ADD COLUMN IF NOT EXISTS nav_bg_color varchar(20) NOT NULL DEFAULT '#1a1a2e';

-- Set defaults on existing row
UPDATE admin_ac SET
    site_name = 'ColorKing',
    logo_url = '',
    primary_color = '#f95959',
    secondary_color = '#ff9a3c',
    nav_bg_color = '#1a1a2e'
WHERE id = 1 AND site_name = 'ColorKing';

SELECT 'Site settings columns added successfully!' AS status;
