/**Begin D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FMARKCODE') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FMARKCODE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FREFTYPE') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FREFTYPE CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FREFID') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FREFID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FREFDETAILID') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FREFDETAILID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FREFDESC') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FREFDESC VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FCREATORID') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FCREATORID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FCREATETIME') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FCREATETIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FMODIFIERID') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FMODIFIERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FMODIFIEDTIME') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FMODIFIEDTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DIMENSIONMAPNEW' AND KSQL_COL_NAME ='FISENABLE') 
 ALTER TABLE T_BCM_DIMENSIONMAPNEW ADD (FISENABLE CHAR(1) DEFAULT '1' NOT NULL );

/**End D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_table.sql **/
