/** 增加数据行权限、列权限的字段fseq。因未在PDM增加字段，导致全量对比生成脚本时缺失字段。 **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRCS_ROLEFIELDENTRY' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_HRCS_ROLEFIELDENTRY ADD (FSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRCS_USERFIELDENTRY' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_HRCS_USERFIELDENTRY ADD (FSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRCS_ROLEBDRULEENTRY' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_HRCS_ROLEBDRULEENTRY ADD (FSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRCS_USERBDRULEENTRY' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_HRCS_USERBDRULEENTRY ADD (FSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRCS_ROLEDATARULEENTRY' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_HRCS_ROLEDATARULEENTRY ADD (FSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRCS_USERDATARULEENTRY' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_HRCS_USERDATARULEENTRY ADD (FSEQ INT DEFAULT 0 NOT NULL );

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