-- 商机项目需求新增字段：项目（商机项目、商机项目号、由商机项目转成）
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMPD_PROJECT_MCC' AND KSQL_COL_NAME ='FISBUSIPROJ') 
ALTER TABLE T_PMPD_PROJECT_MCC ADD (FISBUSIPROJ CHAR(1) DEFAULT '0' NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMPD_PROJECT_MCC' AND KSQL_COL_NAME ='FBUSIPROJNUMB') 
ALTER TABLE T_PMPD_PROJECT_MCC ADD (FBUSIPROJNUMB NVARCHAR(30) DEFAULT ' ' NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMPD_PROJECT_MCC' AND KSQL_COL_NAME ='FFROMBUSIPROJ') 
ALTER TABLE T_PMPD_PROJECT_MCC ADD (FFROMBUSIPROJ CHAR(1) DEFAULT '0' NOT NULL);


-- 商机项目需求新增字段：wbs（售前/商机）
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMTS_WBS' AND KSQL_COL_NAME ='FISBUSIWBS') 
ALTER TABLE T_PMTS_WBS ADD (FISBUSIWBS CHAR(1) DEFAULT '0' NOT NULL);
