/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_table.sql **/
/* 用户-业务角色关系有效期*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERBIZROLE' AND KSQL_COL_NAME ='FCREATEDATEFIELD') 
 ALTER TABLE T_PERM_USERBIZROLE ADD (FCREATEDATEFIELD DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERBIZROLE' AND KSQL_COL_NAME ='FCREATERFIELD') 
 ALTER TABLE T_PERM_USERBIZROLE ADD (FCREATERFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERBIZROLE' AND KSQL_COL_NAME ='FMODIFYDATEFIELD') 
 ALTER TABLE T_PERM_USERBIZROLE ADD (FMODIFYDATEFIELD DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERBIZROLE' AND KSQL_COL_NAME ='FMODIFIERFIELD') 
 ALTER TABLE T_PERM_USERBIZROLE ADD (FMODIFIERFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERBIZROLE' AND KSQL_COL_NAME ='FSTARTTIME') 
 ALTER TABLE T_PERM_USERBIZROLE ADD (FSTARTTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERBIZROLE' AND KSQL_COL_NAME ='FENDTIME') 
 ALTER TABLE T_PERM_USERBIZROLE ADD (FENDTIME DATETIME );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_table.sql **/
