/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_MROLOCKCONTROL') 
 CREATE TABLE T_POM_MROLOCKCONTROL (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS VARCHAR(50) 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,
FORGID BIGINT DEFAULT 0 NOT NULL,
FBILLDATE DATETIME,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FLOCKINFOID BIGINT DEFAULT 0 NOT NULL,
FLOCKPOS VARCHAR(80) DEFAULT ' ' NOT NULL,
FBIZSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(500) DEFAULT ' ' NOT NULL,
FBORROWERID BIGINT DEFAULT 0 NOT NULL,
FTAGCOUNT BIGINT DEFAULT 0 NOT NULL,
FLOCKCREATERID BIGINT DEFAULT 0 NOT NULL,
FLOCKINDUSTRY NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_MROLOCKCONTROLENTRY') 
 CREATE TABLE T_POM_MROLOCKCONTROLENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FMODIFIERFIELD BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATEFIELD DATETIME,
FTAG NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPERSONID BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYCREATEDATE DATETIME,
FISREMOVE CHAR(1) DEFAULT '0' NOT NULL,
FREMOVEPERSONID BIGINT DEFAULT 0 NOT NULL,
FENTRYREMOVEDATE DATETIME
);



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