-- TCC本地事务表
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_DTX_LOCAL_TX_LOG')
 CREATE TABLE T_DTX_LOCAL_TX_LOG (
FID BIGINT DEFAULT 0 NOT NULL,
FXID VARCHAR(100) DEFAULT ' ' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCLOUD_ID VARCHAR(100) DEFAULT ' ' NOT NULL,
FAPP_ID VARCHAR(100) DEFAULT ' ' NOT NULL,
FRESOURCE VARCHAR(100) DEFAULT ' ' NOT NULL,
FPARA_TYPE VARCHAR(1000) DEFAULT ' ' NOT NULL,
FPARAS NCLOB,
FCODE VARCHAR(100) DEFAULT ' ' NOT NULL,
FBIZID VARCHAR(100) DEFAULT ' ' NOT NULL,
FCREATE_TIME DATETIME
);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_DTX_LOCAL_TX_LOG') CREATE UNIQUE INDEX IDX_DTX_LOCAL_TX_LOG ON T_DTX_LOCAL_TX_LOG (FXID ,FSEQ);

-- 以下只是表中字段的解释，无需执行
-- 以下只是表中字段的解释，无需执行
-- COMMENT ON TABLE t_idem_rpcidempotentprocess IS '幂等性本地表';
-- COMMENT ON COLUMN t_idem_rpcidempotentprocess.fidempotentkey IS '幂等唯一标识';
-- COMMENT ON COLUMN t_idem_rpcidempotentprocess.fcreatedtime IS '创建时间';
-- COMMENT ON COLUMN t_idem_rpcidempotentprocess.frenewalinstance IS 'jvm实例启动时间';
-- COMMENT ON COLUMN t_idem_rpcidempotentprocess.frenewaltime IS '最新续约时间';
-- COMMENT ON COLUMN t_idem_rpcidempotentprocess.falivedtime IS '有效时长';
-- COMMENT ON COLUMN t_idem_rpcidempotentprocess.fresult IS '执行结果';
-- COMMENT ON COLUMN t_idem_rpcidempotentprocess.fexecutestatus IS '执行状态';