/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_BGMCONTROLDIMENSION') 
 CREATE TABLE T_EB_BGMCONTROLDIMENSION (
FID BIGINT DEFAULT 0 NOT NULL,
FMODEL BIGINT DEFAULT 0 NOT NULL,
FBASEDATAFIELD BIGINT DEFAULT 0 NOT NULL,
FCREATOR BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERTIME DATETIME,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FCONTROLDIM NVARCHAR(200) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CONTROLVERSIONORG') 
 CREATE TABLE T_EB_CONTROLVERSIONORG (
FID BIGINT DEFAULT 0 NOT NULL,
FCONTROLVERSIONID BIGINT DEFAULT 0 NOT NULL,
FORGRANGE BIGINT DEFAULT 0 NOT NULL
);



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