|
|
@ -6,20 +6,20 @@ CREATE TABLE if not EXISTS dtm.trans_global ( |
|
|
`id` bigint(22) NOT NULL AUTO_INCREMENT, |
|
|
`id` bigint(22) NOT NULL AUTO_INCREMENT, |
|
|
`gid` varchar(128) NOT NULL COMMENT 'global transaction id', |
|
|
`gid` varchar(128) NOT NULL COMMENT 'global transaction id', |
|
|
`trans_type` varchar(45) not null COMMENT 'transaction type: saga | xa | tcc | msg', |
|
|
`trans_type` varchar(45) not null COMMENT 'transaction type: saga | xa | tcc | msg', |
|
|
`status` varchar(12) NOT NULL COMMENT 'tranaction status: prepared | submitted | aborting | finished | rollbacked', |
|
|
`status` varchar(12) NOT NULL COMMENT 'transaction status: prepared | submitted | aborting | finished | rollbacked', |
|
|
`query_prepared` varchar(1024) NOT NULL COMMENT 'url to check for msg|workflow', |
|
|
`query_prepared` varchar(1024) NOT NULL COMMENT 'url to check for msg|workflow', |
|
|
`protocol` varchar(45) not null comment 'protocol: http | grpc | json-rpc', |
|
|
`protocol` varchar(45) not null comment 'protocol: http | grpc | json-rpc', |
|
|
`create_time` datetime DEFAULT NULL, |
|
|
`create_time` datetime DEFAULT NULL, |
|
|
`update_time` datetime DEFAULT NULL, |
|
|
`update_time` datetime DEFAULT NULL, |
|
|
`finish_time` datetime DEFAULT NULL, |
|
|
`finish_time` datetime DEFAULT NULL, |
|
|
`rollback_time` datetime DEFAULT NULL, |
|
|
`rollback_time` datetime DEFAULT NULL, |
|
|
`options` varchar(1024) DEFAULT 'options for transaction like: TimeoutToFail, RequestTimeout', |
|
|
`options` varchar(1024) DEFAULT '' COMMENT 'options for transaction like: TimeoutToFail, RequestTimeout', |
|
|
`custom_data` varchar(1024) DEFAULT '' COMMENT 'custom data for transaction', |
|
|
`custom_data` varchar(1024) DEFAULT '' COMMENT 'custom data for transaction', |
|
|
`next_cron_interval` int(11) default null comment 'next cron interval. for use of cron job', |
|
|
`next_cron_interval` int(11) default null comment 'next cron interval. for use of cron job', |
|
|
`next_cron_time` datetime default null comment 'next time to process this trans. for use of cron job', |
|
|
`next_cron_time` datetime default null comment 'next time to process this trans. for use of cron job', |
|
|
`owner` varchar(128) not null default '' comment 'who is locking this trans', |
|
|
`owner` varchar(128) not null default '' comment 'who is locking this trans', |
|
|
`ext_data` TEXT comment 'result for this trans. currently used in workflow pattern', |
|
|
`ext_data` TEXT comment 'extra data for this trans. currently used in workflow pattern', |
|
|
`result` varchar(1024) DEFAULT '' COMMENT 'rollback reason for transaction', |
|
|
`result` varchar(1024) DEFAULT '' COMMENT 'result for transaction', |
|
|
`rollback_reason` varchar(1024) DEFAULT '' COMMENT 'rollback reason for transaction', |
|
|
`rollback_reason` varchar(1024) DEFAULT '' COMMENT 'rollback reason for transaction', |
|
|
PRIMARY KEY (`id`), |
|
|
PRIMARY KEY (`id`), |
|
|
UNIQUE KEY `gid` (`gid`), |
|
|
UNIQUE KEY `gid` (`gid`), |
|
|
|