/**Begin D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_BIZRULEALLPROCESS') 
 CREATE TABLE T_BCM_BIZRULEALLPROCESS (
FID BIGINT DEFAULT 0 NOT NULL,
FBIZRULEID BIGINT DEFAULT 0 NOT NULL,
FDIMENSIONID BIGINT DEFAULT 0 NOT NULL,
FMEMBERID BIGINT DEFAULT 0 NOT NULL,
FEXECSORT SMALLINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_BREXECINFO' AND KSQL_COL_NAME ='FPROCESS') 
 ALTER TABLE T_BCM_BREXECINFO ADD (FPROCESS BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_BIZRULE' AND KSQL_COL_NAME ='FDEFAULTIMPORT') 
 ALTER TABLE T_BCM_BIZRULE ADD (FDEFAULTIMPORT CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_BIZRULE' AND KSQL_COL_NAME ='FISCOMMON') 
 ALTER TABLE T_BCM_BIZRULE ADD (FISCOMMON CHAR(1) DEFAULT '0' NOT NULL );

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