-- 回滚：将已修复的 VirtualNo 还原为 ICCID
-- 注意：只还原那些 virtual_no 能匹配到 iot_card.virtual_no 的记录
UPDATE tb_personal_customer_device pcd
SET virtual_no = ic.iccid
FROM tb_iot_card ic
WHERE pcd.virtual_no = ic.virtual_no
  AND pcd.deleted_at IS NULL
  AND ic.virtual_no != ic.iccid;
