/**Begin D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ADJUSTEXPORTPLAN') 
 CREATE TABLE T_BCM_ADJUSTEXPORTPLAN (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FAPPLYSCOPE CHAR(1) DEFAULT '1' NOT NULL,
FDEFAULTFLAG CHAR(1) DEFAULT '0' NOT NULL,
FDATACONFIG VARCHAR(500) DEFAULT ' ' NOT NULL,
FROWCONFIG VARCHAR(500) DEFAULT ' ' NOT NULL,
FCOLUMNCONFIG VARCHAR(2000) DEFAULT ' ' NOT NULL,
FDESCRIPTION VARCHAR(500) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ADJEXPORTORGSCOPE') 
 CREATE TABLE T_BCM_ADJEXPORTORGSCOPE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCOPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FENTITYID BIGINT DEFAULT 0 NOT NULL,
FPROPERTYVALUEID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ADJUSTUSERCONFIG') 
 CREATE TABLE T_BCM_ADJUSTUSERCONFIG (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FEXPORTPLANID BIGINT DEFAULT 0 NOT NULL,
FUSERID BIGINT DEFAULT 0 NOT NULL
);



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