/**Begin D:\git\pdm\pdm_upgrade\PDM1\ER_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_INVOICEASYNCLOG') 
 CREATE TABLE T_ER_INVOICEASYNCLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FREQTIME DATETIME,
FREQSTATUS CHAR(1) DEFAULT '0' NOT NULL,
FXHTRACEID VARCHAR(36) DEFAULT ' ' NOT NULL,
FBIZOBJID VARCHAR(36) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(80) DEFAULT ' ' NOT NULL,
FBILLID BIGINT DEFAULT 0 NOT NULL,
FBILLOPERID BIGINT DEFAULT 0 NOT NULL,
FINVOICECLOUDOPER VARCHAR(10) DEFAULT ' ' NOT NULL,
FPARAM VARCHAR(50) DEFAULT ' ' NOT NULL,
FPARAM_TAG NCLOB,
FRESPONSE VARCHAR(255) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FICPID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_OPERATION') 
 CREATE TABLE T_ER_OPERATION (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(80) DEFAULT ' ' NOT NULL,
FPLUGIN VARCHAR(255) DEFAULT ' ' NOT NULL,
FSYNC CHAR(1) DEFAULT '0' NOT NULL,
FSYS CHAR(1) DEFAULT '0' NOT NULL
);


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



/**End D:\git\pdm\pdm_upgrade\PDM1\ER_table.sql **/
