seata.sql 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : localhost
  4. Source Server Type : MariaDB
  5. Source Server Version : 100316
  6. Source Host : localhost:3300
  7. Source Schema : seata
  8. Target Server Type : MariaDB
  9. Target Server Version : 100316
  10. File Encoding : 65001
  11. Date: 05/01/2022 20:25:07
  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 utf8 COLLATE utf8_general_ci NOT NULL,
  22. `transaction_id` bigint(20) NULL DEFAULT NULL,
  23. `resource_group_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  24. `resource_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  25. `branch_type` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  26. `status` tinyint(4) NULL DEFAULT NULL,
  27. `client_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  28. `application_data` varchar(2000) CHARACTER SET utf8 COLLATE utf8_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 = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  34. -- ----------------------------
  35. -- Table structure for global_table
  36. -- ----------------------------
  37. DROP TABLE IF EXISTS `global_table`;
  38. CREATE TABLE `global_table` (
  39. `xid` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  40. `transaction_id` bigint(20) NULL DEFAULT NULL,
  41. `status` tinyint(4) NOT NULL,
  42. `application_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  43. `transaction_service_group` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  44. `transaction_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  45. `timeout` int(11) NULL DEFAULT NULL,
  46. `begin_time` bigint(20) NULL DEFAULT NULL,
  47. `application_data` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  48. `gmt_create` datetime(0) NULL DEFAULT NULL,
  49. `gmt_modified` datetime(0) NULL DEFAULT NULL,
  50. PRIMARY KEY (`xid`) USING BTREE,
  51. INDEX `idx_gmt_modified_status`(`gmt_modified`, `status`) USING BTREE,
  52. INDEX `idx_transaction_id`(`transaction_id`) USING BTREE
  53. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  54. -- ----------------------------
  55. -- Table structure for lock_table
  56. -- ----------------------------
  57. DROP TABLE IF EXISTS `lock_table`;
  58. CREATE TABLE `lock_table` (
  59. `row_key` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  60. `xid` varchar(96) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  61. `transaction_id` bigint(20) NULL DEFAULT NULL,
  62. `branch_id` bigint(20) NOT NULL,
  63. `resource_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  64. `table_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  65. `pk` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  66. `gmt_create` datetime(0) NULL DEFAULT NULL,
  67. `gmt_modified` datetime(0) NULL DEFAULT NULL,
  68. PRIMARY KEY (`row_key`) USING BTREE,
  69. INDEX `idx_branch_id`(`branch_id`) USING BTREE
  70. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  71. SET FOREIGN_KEY_CHECKS = 1;