/** 增加角色组缺失的字段。因未在PDM增加字段，导致全量对比生成脚本时缺失字段。 **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_PERMROLEGRP' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_HBSS_PERMROLEGRP ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_PERMROLEGRP' AND KSQL_COL_NAME ='FENABLE') 
 ALTER TABLE T_HBSS_PERMROLEGRP ADD (FENABLE VARCHAR(2) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_PERMROLEGRP_L' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_HBSS_PERMROLEGRP_L ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_PERMFILEGRP' AND KSQL_COL_NAME ='FGROUPNAME') 
ALTER TABLE T_HBSS_PERMFILEGRP ADD (FGROUPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_PERMFILEGRP_L' AND KSQL_COL_NAME ='FGROUPNAME') 
ALTER TABLE T_HBSS_PERMFILEGRP_L ADD (FGROUPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_PERMFILEGRP' AND KSQL_COL_NAME ='FFULLNAME') 
 ALTER TABLE T_HBSS_PERMFILEGRP ADD (FFULLNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_PERMFILEGRP' AND KSQL_COL_NAME ='FISSYSPRESET') 
 ALTER TABLE T_HBSS_PERMFILEGRP ADD (FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL);
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_PERMFILEGRP_L' AND KSQL_COL_NAME ='FFULLNAME') 
 ALTER TABLE T_HBSS_PERMFILEGRP_L ADD (FFULLNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );