ALTER TABLE system_settings ADD COLUMN setting_name VARCHAR(160) DEFAULT NULL;
ALTER TABLE system_settings ADD COLUMN setting_group VARCHAR(64) DEFAULT NULL;
ALTER TABLE system_settings ADD COLUMN value_type VARCHAR(32) NOT NULL DEFAULT 'text';
ALTER TABLE system_settings ADD COLUMN scope VARCHAR(80) NOT NULL DEFAULT '全平台';
ALTER TABLE system_settings ADD COLUMN status VARCHAR(32) NOT NULL DEFAULT '启用';
ALTER TABLE system_settings ADD COLUMN effective_at DATETIME(3) DEFAULT NULL;
ALTER TABLE system_settings ADD COLUMN change_reason TEXT;
ALTER TABLE system_settings ADD COLUMN description TEXT;

CREATE INDEX idx_system_settings_group_status ON system_settings (setting_group, status);
