-- ProxyPool：设置表维护（负优化清理 + 推荐验证参数）
-- 用法：在停服或确认无并发写入时执行；或运行 python scripts/apply_settings_maintenance.py
-- 注意：改库后需「重启应用」或在 WebUI「保存设置」才会让运行中的 WorkerPool / Validator 重载并发与超时。

-- 废弃键
DELETE FROM settings WHERE key = 'crawl_timeout';
DELETE FROM settings WHERE key = 'max_retries';

-- 推荐验证参数（可按机器与网络再调大 default_concurrency）
INSERT INTO settings (key, value, updated_at) VALUES ('validation_timeout', '6', CURRENT_TIMESTAMP)
ON CONFLICT(key) DO UPDATE SET value = excluded.value, updated_at = CURRENT_TIMESTAMP;

INSERT INTO settings (key, value, updated_at) VALUES ('default_concurrency', '120', CURRENT_TIMESTAMP)
ON CONFLICT(key) DO UPDATE SET value = excluded.value, updated_at = CURRENT_TIMESTAMP;
