IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_USER' AND KSQL_COL_NAME IN ('FSTARTTIME')) 
 ALTER TABLE T_PERM_LOG_DIFF_USER ADD (FSTARTTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_USER' AND KSQL_COL_NAME IN ('FENDTIME')) 
 ALTER TABLE T_PERM_LOG_DIFF_USER ADD (FENDTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERM_LOG_DIFF_UGBIZROLE')
 CREATE TABLE T_PERM_LOG_DIFF_UGBIZROLE (
FID BIGINT DEFAULT 0 NOT NULL,
FPERM_LOGID BIGINT DEFAULT 0 NOT NULL,
FUSRGRP_ID BIGINT DEFAULT 0 NOT NULL,
FUSRGRP_NAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FUSRGRP_NUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FUSRGRPSTDID BIGINT DEFAULT 1404221671421785088 NOT NULL,
FUSRGRPSTD_DESC VARCHAR(255) DEFAULT ' ' NOT NULL,
FBUSIROLE_ID BIGINT DEFAULT 0 NOT NULL,
FBUSIROLE_NUMBER VARCHAR(255) DEFAULT ' ' NOT NULL,
FBUSIROLE_NAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSTARTTIME DATETIME,
FENDTIME DATETIME,
FOP_DESC NVARCHAR(300) DEFAULT ' ' NOT NULL,
FCREATE_TIME DATETIME,
FDATACHANGE_TYPE INT DEFAULT 0 NOT NULL,
FDATACHANGE_TYPE_DESC NVARCHAR(20) DEFAULT ' ' NOT NULL
);
