/**Begin D:\PDM_UPGRADE\PDM_NEW\BOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_DATARULE' AND KSQL_COL_NAME ='FNOCODERULE') 
 ALTER TABLE T_PERM_DATARULE ADD (FNOCODERULE NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_FIELDPERMDETAIL' AND KSQL_COL_NAME ='FPERMITEMID') 
 ALTER TABLE T_PERM_FIELDPERMDETAIL ADD (FPERMITEMID VARCHAR(36) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_ROLE' AND KSQL_COL_NAME ='FSORTCODE') 
 ALTER TABLE T_PERM_ROLE ADD (FSORTCODE INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_ROLE' AND KSQL_COL_NAME ='FAPPMANAGETYPE') 
 ALTER TABLE T_PERM_ROLE ADD (FAPPMANAGETYPE VARCHAR(18) DEFAULT 'all' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_ROLE' AND KSQL_COL_NAME ='FAPPUSETYPE') 
 ALTER TABLE T_PERM_ROLE ADD (FAPPUSETYPE VARCHAR(18) DEFAULT 'all' NOT NULL );

/**End D:\PDM_UPGRADE\PDM_NEW\BOS_table.sql **/
