/** 玩美入职下沉中台基础资料升级，增加出厂编码，出厂名称，出厂数据编辑状态字段 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_BREAKUPREASON' AND KSQL_COL_NAME ='FORINUMBER')
ALTER TABLE T_HBSS_BREAKUPREASON ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_BREAKUPREASON' AND KSQL_COL_NAME ='FORINAME')
ALTER TABLE T_HBSS_BREAKUPREASON ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_BREAKUPREASON' AND KSQL_COL_NAME ='FORISTATUS')
ALTER TABLE T_HBSS_BREAKUPREASON ADD (FORISTATUS VARCHAR(2) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_BREAKUPREASON_L' AND KSQL_COL_NAME ='FORINAME')
ALTER TABLE T_HBSS_BREAKUPREASON_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_BREAKUPTYPE' AND KSQL_COL_NAME ='FORINUMBER')
ALTER TABLE T_HBSS_BREAKUPTYPE ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_BREAKUPTYPE' AND KSQL_COL_NAME ='FORINAME')
ALTER TABLE T_HBSS_BREAKUPTYPE ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_BREAKUPTYPE' AND KSQL_COL_NAME ='FORISTATUS')
ALTER TABLE T_HBSS_BREAKUPTYPE ADD (FORISTATUS VARCHAR(2) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_BREAKUPTYPE_L' AND KSQL_COL_NAME ='FORINAME')
ALTER TABLE T_HBSS_BREAKUPTYPE_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );


