/**Begin D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_MYTEMPLATELIST' AND KSQL_COL_NAME ='FSTATUS') 
 ALTER TABLE T_BCM_MYTEMPLATELIST ADD (FSTATUS CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_MYTEMPLATELIST' AND KSQL_COL_NAME ='FISORGRPT') 
 ALTER TABLE T_BCM_MYTEMPLATELIST ADD (FISORGRPT CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_MYTEMPLATELIST' AND KSQL_COL_NAME ='FMODIFIERID') 
 ALTER TABLE T_BCM_MYTEMPLATELIST ADD (FMODIFIERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_MYTEMPLATELIST' AND KSQL_COL_NAME ='FMODIFYTIME') 
 ALTER TABLE T_BCM_MYTEMPLATELIST ADD (FMODIFYTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_MYTEMPLATELIST' AND KSQL_COL_NAME ='FEFFECTIVEDATE') 
 ALTER TABLE T_BCM_MYTEMPLATELIST ADD (FEFFECTIVEDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_MYTEMPLATELIST' AND KSQL_COL_NAME ='FEXPIRINGDATE') 
 ALTER TABLE T_BCM_MYTEMPLATELIST ADD (FEXPIRINGDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ORGRPTTEMPLATE' AND KSQL_COL_NAME ='FISORGRPT') 
 ALTER TABLE T_BCM_ORGRPTTEMPLATE ADD (FISORGRPT CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ORGRPTTEMPLATE' AND KSQL_COL_NAME ='FCREATORID') 
 ALTER TABLE T_BCM_ORGRPTTEMPLATE ADD (FCREATORID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ORGRPTTEMPLATE' AND KSQL_COL_NAME ='FCREATETIME') 
 ALTER TABLE T_BCM_ORGRPTTEMPLATE ADD (FCREATETIME DATETIME );

/**End D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
