/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_AJSGLOBALSETTING' AND KSQL_COL_NAME ='FSETTYPE') 
 ALTER TABLE T_BCM_AJSGLOBALSETTING ADD (FSETTYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_AJSGLOBALSETTING' AND KSQL_COL_NAME ='FSOURCECSL') 
 ALTER TABLE T_BCM_AJSGLOBALSETTING ADD (FSOURCECSL BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_AJSGLOBALSETTING' AND KSQL_COL_NAME ='FSHARECSL') 
 ALTER TABLE T_BCM_AJSGLOBALSETTING ADD (FSHARECSL BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_TEMPLATE' AND KSQL_COL_NAME ='FHASDEFAULTAUTH') 
 ALTER TABLE T_BCM_TEMPLATE ADD (FHASDEFAULTAUTH CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_CONFIGSETTING' AND KSQL_COL_NAME ='FSEARCHMODEL') 
 ALTER TABLE T_BCM_CONFIGSETTING ADD (FSEARCHMODEL BIGINT DEFAULT 0 NOT NULL );

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