/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_SCHEMESCENE') 
 CREATE TABLE T_BCM_SCHEMESCENE (
FID BIGINT DEFAULT 0 NOT NULL,
FMODEL BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_EXPORTFILENAMERULE') 
 CREATE TABLE T_BCM_EXPORTFILENAMERULE (
FID BIGINT DEFAULT 0 NOT NULL,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FFILERULE VARCHAR(500) DEFAULT ' ' NOT NULL,
FSHEETRULE VARCHAR(500) DEFAULT ' ' NOT NULL,
FFILENAME NVARCHAR(500) DEFAULT ' ' NOT NULL,
FSHEETNAME NVARCHAR(500) DEFAULT ' ' NOT NULL,
FCONNECTSTR NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFIXVALUE NVARCHAR(500) DEFAULT ' ' NOT NULL,
FSHEETCONNECTSTR NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSHEETFIXVALUE NVARCHAR(500) DEFAULT ' ' NOT NULL,
FEXCELFILETYPE CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_EXPORTFILENAMERULE_L') 
 CREATE TABLE T_BCM_EXPORTFILENAMERULE_L (
FPKID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(20) DEFAULT ' ' NOT NULL,
FFILENAME NVARCHAR(500) DEFAULT ' ' NOT NULL,
FSHEETNAME NVARCHAR(500) DEFAULT ' ' NOT NULL,
FFIXVALUE NVARCHAR(500) DEFAULT ' ' NOT NULL,
FSHEETFIXVALUE NVARCHAR(500) DEFAULT ' ' NOT NULL
);



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