/**Begin D:\PDM_UPGRADE\PDM1\POM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_XMFTORDERMLOGENTRY') 
 CREATE TABLE T_POM_XMFTORDERMLOGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCHANGETYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSEQFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIAL BIGINT DEFAULT 0 NOT NULL,
FQTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISCONTROLQTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINWARDEPT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FUNITFIELD BIGINT DEFAULT 0 NOT NULL,
FRCVINHIGHLIMIT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRCVINLOWLIMIT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINWARMAX NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINWARMIN NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPLANBEGINTIME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPLANENDTIME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPLANPREPARETIME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPRODUCTTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCBILLNOENTRY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCBILLSEQENTRY BIGINT DEFAULT 0 NOT NULL,
FWAREHOUSE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLOCATION NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCHANGETYPEENTITY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_XMFTORDERMLOG') 
 CREATE TABLE T_POM_XMFTORDERMLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FSRCBILLID BIGINT DEFAULT 0 NOT NULL,
FSRCBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCBILLVERSION BIGINT DEFAULT 0 NOT NULL,
FXBILLID BIGINT DEFAULT 0 NOT NULL,
FXBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBIZTIME DATETIME,
FXREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FSRCBILLJSON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSRCBILLJSON_TAG NCLOB,
FXBILLJSON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FXBILLJSON_TAG NCLOB,
FXMDJSON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FXMDJSON_TAG NCLOB,
FSRCBILLENTRYID BIGINT DEFAULT 0 NOT NULL,
FXBILLENTRYID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FSRCBILLENTRYSEQ BIGINT DEFAULT 0 NOT NULL,
FXBILLENTRYSEQ BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FCHANGESTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCHANGETYPE NVARCHAR(50) DEFAULT ' ' NOT NULL
);



/**End D:\PDM_UPGRADE\PDM1\POM_table.sql **/
