/**Begin D:\PDM_UPGRADE\PDM1\MSPLAN_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_BATCH_EDIT') 
 CREATE TABLE T_MSPLAN_BATCH_EDIT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(100) DEFAULT ' ' NOT NULL,
FFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMAPPING NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDATASOURCE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSTATUS NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


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



IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_PLANUPDATELOG') 
 CREATE TABLE T_MSPLAN_PLANUPDATELOG (
FID BIGINT DEFAULT 0 NOT NULL,
FUSERNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FOPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FOPDESC NVARCHAR(50) DEFAULT ' ' NOT NULL,
FOPDATE DATETIME,
FPROPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPREVALUE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNEXTVALUE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPLANORDERENTRY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPLANORDERBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPLANORDERID BIGINT DEFAULT 0 NOT NULL,
FPLANORDERENTRYID BIGINT DEFAULT 0 NOT NULL
);



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