/**Begin D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_BATCHTASK_ENTRY') 
 CREATE TABLE T_MSPLAN_BATCHTASK_ENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FEVNTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYRESULT VARCHAR(5) DEFAULT ' ' NOT NULL,
FENTRYDETAILMSG NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FINSTANCEID VARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYOPERATMS BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_BATCHTASK_LOG') 
 CREATE TABLE T_MSPLAN_BATCHTASK_LOG (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(80) DEFAULT ' ' NOT NULL,
FBILLSTATUS VARCHAR(5) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FJOBID VARCHAR(50) DEFAULT ' ' NOT NULL,
FJOBNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(5) DEFAULT ' ' NOT NULL,
FSTARTTIME DATETIME,
FENDTIME DATETIME,
FPROGRESS BIGINT DEFAULT 0 NOT NULL,
FOPERATOR BIGINT DEFAULT 0 NOT NULL,
FQUEUENAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBIZCLASS VARCHAR(255) DEFAULT ' ' NOT NULL,
FCONTROLQUEUE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDURATION BIGINT DEFAULT 0 NOT NULL
);



/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_table.sql **/
