/**Begin D:\PDM_UPGRADE\PDM1\HBSS_table.sql **/
 EXEC p_AlterColumn 'T_HBSS_DIFFHANDLER', 'FSOURCEMETHODNAME', 'VARCHAR(50)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_HBSS_DIFFHANDLER', 'FSOURCEMETHODSIGN', 'VARCHAR(50)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_HBSS_DIFFHANDLER', 'FRETURNVALUEDESC', 'NVARCHAR(200)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_DIFFHANDLER' AND KSQL_COL_NAME ='FAPITYPE') 
 ALTER TABLE T_HBSS_DIFFHANDLER ADD (FAPITYPE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_DIFFHANDLER' AND KSQL_COL_NAME ='FTYPE') 
 ALTER TABLE T_HBSS_DIFFHANDLER ADD (FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_DIFFHANDLER' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_HBSS_DIFFHANDLER ADD (FDESCRIPTION NVARCHAR(500) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_DIFFHANDLER' AND KSQL_COL_NAME ='FFUNCTIONNAME') 
 ALTER TABLE T_HBSS_DIFFHANDLER ADD (FFUNCTIONNAME VARCHAR(50) DEFAULT ' ' NOT NULL );
 --- drop column --------- 不允许删除表T_HBSS_DIFFHANDLER的字段FENABLE，请恢复pdm中的字段 ------------------- 
 EXEC p_AlterColumn 'T_HBSS_DIFFHANDLER_L', 'FRETURNVALUEDESC', 'NVARCHAR(200)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_DIFFHANDLER_L' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_HBSS_DIFFHANDLER_L ADD (FDESCRIPTION NVARCHAR(500) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_DIFFHANDLER_L' AND KSQL_COL_NAME ='FFUNCTIONNAME') 
 ALTER TABLE T_HBSS_DIFFHANDLER_L ADD (FFUNCTIONNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_DIFFHANDLERPARAM_L' AND KSQL_COL_NAME ='FENTRYID') 
 ALTER TABLE T_HBSS_DIFFHANDLERPARAM_L ADD (FENTRYID BIGINT DEFAULT 0 NOT NULL );
 --- drop column --------- 不允许删除表T_HBSS_DIFFHANDLERPARAM_L的字段FID，请恢复pdm中的字段 ------------------- 
 EXEC p_AlterColumn 'T_HBSS_DIFFIMPLEMENT', 'FSERVICE', 'VARCHAR(200)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_DIFFIMPLEMENT' AND KSQL_COL_NAME ='FAPITYPE') 
 ALTER TABLE T_HBSS_DIFFIMPLEMENT ADD (FAPITYPE VARCHAR(50) DEFAULT ' ' NOT NULL );


/**End D:\PDM_UPGRADE\PDM1\HBSS_table.sql **/
