-- 为 AmtDevices 表添加 AMT 登录凭据字段
-- 执行前请确保已备份数据库

-- 添加 AmtUsername 字段
ALTER TABLE `AmtDevices` ADD COLUMN `AmtUsername` VARCHAR(100) NULL AFTER `WindowsPassword`;

-- 添加 AmtPassword 字段（加密存储）
ALTER TABLE `AmtDevices` ADD COLUMN `AmtPassword` VARCHAR(500) NULL AFTER `AmtUsername`;

-- 验证字段是否添加成功
-- SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AmtDevices' AND COLUMN_NAME IN ('AmtUsername', 'AmtPassword');
