This is an automated email from the ASF dual-hosted git repository. jianbin pushed a commit to branch docusaurus in repository https://gitbox.apache.org/repos/asf/incubator-seata-website.git
The following commit(s) were added to refs/heads/docusaurus by this push: new b0e778b2e2 optimize: replace sql script (#835) b0e778b2e2 is described below commit b0e778b2e2d1515866df85f8ca3acf894e955abd Author: jimin <sliev...@163.com> AuthorDate: Sun Feb 18 17:11:51 2024 +0800 optimize: replace sql script (#835) --- .../current/user/quickstart.md | 31 +++++++++++----------- .../version-v1.0/user/quickstart.md | 31 +++++++++++----------- .../version-v1.1/user/quickstart.md | 31 +++++++++++----------- .../version-v1.2/user/quickstart.md | 31 +++++++++++----------- .../version-v1.3/user/quickstart.md | 31 +++++++++++----------- .../version-v1.4/user/quickstart.md | 31 +++++++++++----------- .../version-v1.5/user/quickstart.md | 31 +++++++++++----------- .../version-v1.6/user/quickstart.md | 31 +++++++++++----------- .../version-v1.7/user/quickstart.md | 31 +++++++++++----------- .../version-v1.8/user/quickstart.md | 31 +++++++++++----------- .../version-v2.0/user/quickstart.md | 31 +++++++++++----------- .../version-v1.0/user/quickstart.md | 29 ++++++++++---------- .../version-v1.1/user/quickstart.md | 29 ++++++++++---------- .../version-v1.2/user/quickstart.md | 29 ++++++++++---------- .../version-v1.3/user/quickstart.md | 29 ++++++++++---------- .../version-v1.4/user/quickstart.md | 29 ++++++++++---------- .../version-v1.5/user/quickstart.md | 29 ++++++++++---------- .../version-v1.6/user/quickstart.md | 29 ++++++++++---------- .../version-v1.7/user/quickstart.md | 29 ++++++++++---------- .../version-v1.8/user/quickstart.md | 29 ++++++++++---------- .../version-v2.0/user/quickstart.md | 29 ++++++++++---------- src/download_replace_pngs.sh | 26 ++++++++++++++++++ 22 files changed, 342 insertions(+), 315 deletions(-) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/current/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.0/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.0/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.0/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.0/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.1/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.1/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.1/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.1/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.2/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.2/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.2/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.2/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.3/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.3/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.3/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.3/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.4/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.4/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.4/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.4/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.5/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.5/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.5/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.5/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.6/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.6/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.6/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.6/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.7/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.7/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.7/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.7/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v1.8/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v1.8/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v1.8/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v1.8/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/en/docusaurus-plugin-content-docs/version-v2.0/user/quickstart.md b/i18n/en/docusaurus-plugin-content-docs/version-v2.0/user/quickstart.md index 0f442bb3d7..a8067f7b08 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-v2.0/user/quickstart.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-v2.0/user/quickstart.md @@ -138,23 +138,24 @@ dubbo-storage-service.xml ``` ### Step 2: Create UNDO_LOG table -`UNDO_LOG` table is required by SEATA AT mode. + +`UNDO_LOG` table is required by SEATA AT mode. You can obtain the specified version of the undo log SQL script from [github](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; + +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### Step 3: Create tables for example business diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.0/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.0/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.0/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.0/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.1/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.1/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.1/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.1/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.2/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.2/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.2/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.2/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.3/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.3/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.3/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.3/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.4/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.4/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.4/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.4/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.6/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.6/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.6/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.6/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.7/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.7/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.7/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.7/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.8/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.8/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.8/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.8/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v2.0/user/quickstart.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v2.0/user/quickstart.md index b83e703f90..580d29af50 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v2.0/user/quickstart.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v2.0/user/quickstart.md @@ -137,23 +137,22 @@ dubbo-storage-service.xml ``` ### 步骤 2:创建 UNDO_LOG 表 -SEATA AT 模式需要 `UNDO_LOG` 表 +SEATA AT 模式需要 `UNDO_LOG` 表。你可以通过 github 获取到指定版本的undo log SQL [脚本](https://github.com/apache/incubator-seata/tree/2.x/script/client/at/db). ```sql --- 注意此处0.3.0+ 增加唯一索引 ux_undo_log -CREATE TABLE `undo_log` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `branch_id` bigint(20) NOT NULL, - `xid` varchar(100) NOT NULL, - `context` varchar(128) NOT NULL, - `rollback_info` longblob NOT NULL, - `log_status` int(11) NOT NULL, - `log_created` datetime NOT NULL, - `log_modified` datetime NOT NULL, - `ext` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); + ``` ### 步骤 3:为示例业务创建表 diff --git a/src/download_replace_pngs.sh b/src/download_replace_pngs.sh new file mode 100644 index 0000000000..5d8779ecc7 --- /dev/null +++ b/src/download_replace_pngs.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +if [ "$#" -ne 1 ]; then + echo "Usage: $0 <document>" + exit 1 +fi + +DOCUMENT=$1 + +mkdir -p img + +grep -o '[https:]*//[^"]*\.png' "$DOCUMENT" | while read -r URL; do + FILENAME="${URL##*/}" + DOWNLOAD_PATH=$URL + if [[ ! $URL =~ ^https:// ]]; then + DOWNLOAD_PATH="https:${URL}" + fi + wget -O "img/$FILENAME" "$DOWNLOAD_PATH" --no-check-certificate + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' "s|$URL|/img/index/$FILENAME|g" "$DOCUMENT" + else + sed -i "s|$URL|/img/index/$FILENAME|g" "$DOCUMENT" + fi +done + +echo "OK." --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org