/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FMM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FMM_BOMSYNCFIELDCONFIG') 
 CREATE TABLE T_FMM_BOMSYNCFIELDCONFIG (
	FID BIGINT NOT NULL DEFAULT 0,
	FNUMBER VARCHAR(30) NOT NULL DEFAULT ''' ''',
	FNAME VARCHAR(50) NOT NULL DEFAULT ''' ''',
	FSTATUS VARCHAR(50) NOT NULL DEFAULT ''' ''',
	FCREATORID BIGINT NOT NULL DEFAULT 0,
	FMODIFIERID BIGINT NOT NULL DEFAULT 0,
	FENABLE VARCHAR(50) NOT NULL DEFAULT ''' ''',
	FCREATETIME DATETIME NULL,
	FMODIFYTIME DATETIME NULL,
	FMASTERID BIGINT NOT NULL DEFAULT 0,
	FEXCLUDEBOMTYPE BIGINT NOT NULL DEFAULT 0,
	FBUSINESSTYPE VARCHAR(50) NOT NULL DEFAULT ''' '''
);

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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FMM_BOMSYNCFIELDENTRY') 
 CREATE TABLE T_FMM_BOMSYNCFIELDENTRY (
	FID BIGINT NOT NULL DEFAULT 0,
	FENTRYID BIGINT NOT NULL DEFAULT 0,
	FSEQ INT NOT NULL DEFAULT 0,
	FFIELD VARCHAR(50) NOT NULL DEFAULT ''' ''',
	FISSYNC CHAR(1) NOT NULL DEFAULT '0'
);


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