/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\OM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_EXWORKREGIS') 
 CREATE TABLE T_POM_EXWORKREGIS (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FBILLTYPE BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREGISDATE DATETIME,
FREMARK NVARCHAR(500) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMANUPERSONID BIGINT DEFAULT 0 NOT NULL,
FORDERID BIGINT DEFAULT 0 NOT NULL,
FORDERNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FORDERENTRYID BIGINT DEFAULT 0 NOT NULL,
FORDERSEQ NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYPROJECTID BIGINT DEFAULT 0 NOT NULL,
FCUSTOMERID BIGINT DEFAULT 0 NOT NULL,
FDEPARTUREFLIGHT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDEPARTUREDATE DATETIME,
FARRIVEDATE DATETIME,
FARRIVEASSIGNEDWORK CHAR(1) DEFAULT ' ' NOT NULL,
FLEAVEASSIGNEDWORK CHAR(1) DEFAULT ' ' NOT NULL,
FLEAVEFLIGHT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLEAVEWORKBASEDATE DATETIME,
FRETURNDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_EXWORKREGISENTRY') 
 CREATE TABLE T_POM_EXWORKREGISENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FWORKDATE DATETIME,
FWORKCONTENT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FWORKREMARK NVARCHAR(500) DEFAULT ' ' NOT NULL
);



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