/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_ATTACHMENT_OPLOG') 
 CREATE TABLE T_BAS_ATTACHMENT_OPLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FATTTYPE CHAR(1) DEFAULT '0' NOT NULL,
FATTKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FATTPKID BIGINT DEFAULT 0 NOT NULL,
FENTITYNUM VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLPKID VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FOPTYPE CHAR(1) DEFAULT '0' NOT NULL,
FOPTIME DATETIME DEFAULT GETDATE() NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FCLIENT VARCHAR(50) DEFAULT ' ' NOT NULL
);



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