CREATE TABLE IF NOT EXISTS `school_settings` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `setting_key` VARCHAR(255) NOT NULL UNIQUE,
    `setting_value` TEXT,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=INNODB;

-- Insert some default values
INSERT INTO `school_settings` (setting_key, setting_value) VALUES
('school_name', 'My School') ON DUPLICATE KEY UPDATE setting_key=setting_key;
