-- Gold Jewellery Software - Email (SMTP) & Theme Colors settings
-- Migration 005: seeds new keys into the existing generic `settings`
-- table — no new tables needed, just defaults so the new Settings tabs
-- have something sensible to show before anyone edits them.
USE gold_jewellery;

INSERT INTO settings (setting_key, setting_value) VALUES
 ('smtp_enabled', '0'),
 ('smtp_host', ''),
 ('smtp_port', '587'),
 ('smtp_encryption', 'tls'),           -- 'none', 'ssl', or 'tls' (STARTTLS)
 ('smtp_username', ''),
 ('smtp_password', ''),
 ('smtp_from_email', ''),
 ('smtp_from_name', '')
ON DUPLICATE KEY UPDATE setting_key = setting_key;

-- Theme color defaults match this app's existing sidebar CSS
-- (public/assets/css/app.css) exactly, so saving nothing changes nothing.
INSERT INTO settings (setting_key, setting_value) VALUES
 ('theme_primary_color', '#0d6efd'),
 ('theme_accent_color', '#1f8156'),
 ('theme_sidebar_bg', '#0e1c30'),
 ('theme_sidebar_text', '#c9d3dd')
ON DUPLICATE KEY UPDATE setting_key = setting_key;
