ry-seata20240607.sql 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : mysql_localhost
  4. Source Server Type : MySQL
  5. Source Server Version : 50744 (5.7.44-log)
  6. Source Host : localhost:3306
  7. Source Schema : ry-seata
  8. Target Server Type : MySQL
  9. Target Server Version : 50744 (5.7.44-log)
  10. File Encoding : 65001
  11. Date: 07/06/2024 15:48:09
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for branch_table
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `branch_table`;
  19. CREATE TABLE `branch_table` (
  20. `branch_id` bigint(20) NOT NULL,
  21. `xid` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  22. `transaction_id` bigint(20) NULL DEFAULT NULL,
  23. `resource_group_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  24. `resource_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  25. `branch_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  26. `status` tinyint(4) NULL DEFAULT NULL,
  27. `client_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  28. `application_data` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  29. `gmt_create` datetime(6) NULL DEFAULT NULL,
  30. `gmt_modified` datetime(6) NULL DEFAULT NULL,
  31. PRIMARY KEY (`branch_id`) USING BTREE,
  32. INDEX `idx_xid`(`xid`) USING BTREE
  33. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  34. -- ----------------------------
  35. -- Records of branch_table
  36. -- ----------------------------
  37. -- ----------------------------
  38. -- Table structure for global_table
  39. -- ----------------------------
  40. DROP TABLE IF EXISTS `global_table`;
  41. CREATE TABLE `global_table` (
  42. `xid` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  43. `transaction_id` bigint(20) NULL DEFAULT NULL,
  44. `status` tinyint(4) NOT NULL,
  45. `application_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  46. `transaction_service_group` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  47. `transaction_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  48. `timeout` int(11) NULL DEFAULT NULL,
  49. `begin_time` bigint(20) NULL DEFAULT NULL,
  50. `application_data` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  51. `gmt_create` datetime NULL DEFAULT NULL,
  52. `gmt_modified` datetime NULL DEFAULT NULL,
  53. PRIMARY KEY (`xid`) USING BTREE,
  54. INDEX `idx_gmt_modified_status`(`gmt_modified`, `status`) USING BTREE,
  55. INDEX `idx_transaction_id`(`transaction_id`) USING BTREE
  56. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  57. -- ----------------------------
  58. -- Records of global_table
  59. -- ----------------------------
  60. -- ----------------------------
  61. -- Table structure for lock_table
  62. -- ----------------------------
  63. DROP TABLE IF EXISTS `lock_table`;
  64. CREATE TABLE `lock_table` (
  65. `row_key` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  66. `xid` varchar(96) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  67. `transaction_id` bigint(20) NULL DEFAULT NULL,
  68. `branch_id` bigint(20) NOT NULL,
  69. `resource_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  70. `table_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  71. `pk` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  72. `gmt_create` datetime NULL DEFAULT NULL,
  73. `gmt_modified` datetime NULL DEFAULT NULL,
  74. PRIMARY KEY (`row_key`) USING BTREE,
  75. INDEX `idx_branch_id`(`branch_id`) USING BTREE
  76. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  77. -- ----------------------------
  78. -- Records of lock_table
  79. -- ----------------------------
  80. -- ----------------------------
  81. -- Table structure for undo_log
  82. -- ----------------------------
  83. DROP TABLE IF EXISTS `undo_log`;
  84. CREATE TABLE `undo_log` (
  85. `branch_id` bigint(20) NOT NULL COMMENT 'branch transaction id',
  86. `xid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'global transaction id',
  87. `context` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'undo_log context,such as serialization',
  88. `rollback_info` longblob NOT NULL COMMENT 'rollback info',
  89. `log_status` int(11) NOT NULL COMMENT '0:normal status,1:defense status',
  90. `log_created` datetime(6) NOT NULL COMMENT 'create datetime',
  91. `log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
  92. UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
  93. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'AT transaction mode undo table' ROW_FORMAT = COMPACT;
  94. -- ----------------------------
  95. -- Records of undo_log
  96. -- ----------------------------
  97. SET FOREIGN_KEY_CHECKS = 1;