-- Adds extended fields required by the proxy platform configuration wizard
ALTER TABLE `proxy_platform`
    ADD COLUMN `displayName` VARCHAR(255) NULL AFTER `platform`,
    ADD COLUMN `connectionStatus` VARCHAR(50) NOT NULL DEFAULT 'unknown' COMMENT '最近一次连接状态' AFTER `rotationInterval`,
    ADD COLUMN `proxyCount` INT NOT NULL DEFAULT 0 COMMENT '最近同步的可用代理数量' AFTER `connectionStatus`,
    ADD COLUMN `avgResponseTime` INT NULL COMMENT '最近一次连接测试响应时间 (ms)' AFTER `proxyCount`,
    ADD COLUMN `successRate` FLOAT NULL COMMENT '连接成功率 (0-1)' AFTER `avgResponseTime`,
    ADD COLUMN `lastTestAt` DATETIME NULL COMMENT '最近一次连接测试时间' AFTER `successRate`,
    ADD COLUMN `lastTestResult` TEXT NULL COMMENT '最近一次连接测试结果详情(JSON)' AFTER `lastTestAt`;
