/**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_ENUMITEM' AND KSQL_COL_NAME ='FNUMBER') 
 ALTER TABLE T_BCM_ENUMITEM ADD (FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMITEM' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_BCM_ENUMITEM ADD (FSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMITEM' AND KSQL_COL_NAME ='FISONLYLEAF') 
 ALTER TABLE T_BCM_ENUMITEM ADD (FISONLYLEAF CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMITEM' AND KSQL_COL_NAME ='FISALLOWMULTI') 
 ALTER TABLE T_BCM_ENUMITEM ADD (FISALLOWMULTI CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMITEM' AND KSQL_COL_NAME ='FMULTISEPARATOR') 
 ALTER TABLE T_BCM_ENUMITEM ADD (FMULTISEPARATOR VARCHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMITEM' AND KSQL_COL_NAME ='FREMARK') 
 ALTER TABLE T_BCM_ENUMITEM ADD (FREMARK VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMVALUE' AND KSQL_COL_NAME ='FNUMBER') 
 ALTER TABLE T_BCM_ENUMVALUE ADD (FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMVALUE' AND KSQL_COL_NAME ='FPARENTID') 
 ALTER TABLE T_BCM_ENUMVALUE ADD (FPARENTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMVALUE' AND KSQL_COL_NAME ='FLONGNUMBER') 
 ALTER TABLE T_BCM_ENUMVALUE ADD (FLONGNUMBER VARCHAR(200) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMVALUE' AND KSQL_COL_NAME ='FISLEAF') 
 ALTER TABLE T_BCM_ENUMVALUE ADD (FISLEAF CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENUMVALUE' AND KSQL_COL_NAME ='FLEVEL') 
 ALTER TABLE T_BCM_ENUMVALUE ADD (FLEVEL INT DEFAULT 1 NOT NULL );

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