/**Begin D:\PDM_UPGRADE\PDM1\BCM_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_SCHEMECOLLECTLOG' AND KSQL_COL_NAME IN ('FSCHEMENUMBER')) 
 ALTER TABLE T_BCM_SCHEMECOLLECTLOG ADD (FSCHEMENUMBER VARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_SCHEMECOLLECTLOG' AND KSQL_COL_NAME IN ('FSCHEMENAME')) 
 ALTER TABLE T_BCM_SCHEMECOLLECTLOG ADD (FSCHEMENAME NVARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_SCHEMECOLLECTLOG' AND KSQL_COL_NAME IN ('FSCHEMEVERSION')) 
 ALTER TABLE T_BCM_SCHEMECOLLECTLOG ADD (FSCHEMEVERSION VARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_SCHEMECOLLECTLOG_L')
 CREATE TABLE T_BCM_SCHEMECOLLECTLOG_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FSCHEMENAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);



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