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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_DATACONFIGENTRY') 
 CREATE TABLE T_MSPLAN_DATACONFIGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FMUSTINPUT CHAR(1) DEFAULT '0' NOT NULL,
FENABLED CHAR(1) DEFAULT '0' NOT NULL,
FEDITENABLED CHAR(1) DEFAULT '0' NOT NULL,
FSUBMITENABLED CHAR(1) DEFAULT '0' NOT NULL,
FAUDITENABLED CHAR(1) DEFAULT '0' NOT NULL,
FVINIT CHAR(1) DEFAULT '0' NOT NULL,
FVNEW CHAR(1) DEFAULT '0' NOT NULL,
FVEDIT CHAR(1) DEFAULT '0' NOT NULL,
FVVIEW CHAR(1) DEFAULT '0' NOT NULL,
FVSUBMIT CHAR(1) DEFAULT '0' NOT NULL,
FVAUDIT CHAR(1) DEFAULT '0' NOT NULL,
FFIELDKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDEFAULTFUNCPARAM NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSYSMUSTINPUT CHAR(1) DEFAULT '0' NOT NULL,
FALLFIELDKEY NVARCHAR(100) DEFAULT ' ' NOT NULL,
FISDATABASE CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_DATACONFIG_L') 
 CREATE TABLE T_MSPLAN_DATACONFIG_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
);

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