/**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_USERROLE' AND KSQL_COL_NAME ='FCREATEDATEFIELD') 
 ALTER TABLE T_PERM_USERROLE ADD (FCREATEDATEFIELD DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERROLE' AND KSQL_COL_NAME ='FCREATERFIELD') 
 ALTER TABLE T_PERM_USERROLE ADD (FCREATERFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERROLE' AND KSQL_COL_NAME ='FMODIFYDATEFIELD') 
 ALTER TABLE T_PERM_USERROLE ADD (FMODIFYDATEFIELD DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERROLE' AND KSQL_COL_NAME ='FMODIFIERFIELD') 
 ALTER TABLE T_PERM_USERROLE ADD (FMODIFIERFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERROLE' AND KSQL_COL_NAME ='FSTARTTIME') 
 ALTER TABLE T_PERM_USERROLE ADD (FSTARTTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_USERROLE' AND KSQL_COL_NAME ='FENDTIME') 
 ALTER TABLE T_PERM_USERROLE ADD (FENDTIME DATETIME );

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