/**Begin D:\DBA\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_STRUCTOFENTPART' AND KSQL_COL_NAME IN ('FACCOUNTTYPE')) 
 ALTER TABLE T_BCM_STRUCTOFENTPART ADD (FACCOUNTTYPE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_EXTENDSYNLOG') 
 CREATE TABLE T_BCM_EXTENDSYNLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FBIZRULEID BIGINT DEFAULT 0 NOT NULL,
FDIMSTR VARCHAR(2000) DEFAULT ' ' NOT NULL,
FEXTENDDATAID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FCREATERID BIGINT DEFAULT 0 NOT NULL,
FEXTENDMEMBERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_EXTENDDATASUM') 
 CREATE TABLE T_BCM_EXTENDDATASUM (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDATAID BIGINT DEFAULT 0 NOT NULL,
FDATABUSID BIGINT DEFAULT 0 NOT NULL
);



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