-- 为 T_thirdparty_inspection_tasks 表添加 F_diPan 和 F_code 列
IF NOT EXISTS (SELECT * FROM sys.columns WHERE name = 'F_diPan' AND object_id = OBJECT_ID('T_thirdparty_inspection_tasks'))
BEGIN
    ALTER TABLE T_thirdparty_inspection_tasks ADD F_diPan VARCHAR(100);
    PRINT '列 F_diPan 已添加';
END
ELSE
BEGIN
    PRINT '列 F_diPan 已存在';
END
GO

IF NOT EXISTS (SELECT * FROM sys.columns WHERE name = 'F_code' AND object_id = OBJECT_ID('T_thirdparty_inspection_tasks'))
BEGIN
    ALTER TABLE T_thirdparty_inspection_tasks ADD F_code VARCHAR(50);
    PRINT '列 F_code 已添加';
END
ELSE
BEGIN
    PRINT '列 F_code 已存在';
END
GO
