CREATE TABLE IF NOT EXISTS settings (
    id INT AUTO_INCREMENT PRIMARY KEY,
    setting_key VARCHAR(50) NOT NULL UNIQUE,
    setting_value TEXT,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

-- Insert default SMTP settings (users should update these in admin panel)
INSERT IGNORE INTO settings (setting_key, setting_value) VALUES 
('smtp_host', 'sandbox.smtp.mailtrap.io'),
('smtp_port', '2525'),
('smtp_user', ''),
('smtp_pass', ''),
('smtp_from_email', 'admin@sanibook.ke'),
('smtp_from_name', 'SaniBook Admin');
