seata_storage.sql 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : mysql_localhost
  4. Source Server Type : MySQL
  5. Source Server Version : 50723
  6. Source Host : localhost:3306
  7. Source Schema : seata_storage
  8. Target Server Type : MySQL
  9. Target Server Version : 50723
  10. File Encoding : 65001
  11. Date: 13/11/2019 18:12:33
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for tb_storage
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `tb_storage`;
  19. CREATE TABLE `tb_storage` (
  20. `id` int(11) NOT NULL AUTO_INCREMENT,
  21. `commodity_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  22. `count` int(11) NULL DEFAULT 0,
  23. PRIMARY KEY (`id`) USING BTREE,
  24. UNIQUE INDEX `commodity_code`(`commodity_code`) USING BTREE
  25. ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci;
  26. -- ----------------------------
  27. -- Records of tb_storage
  28. -- ----------------------------
  29. BEGIN;
  30. INSERT INTO `tb_storage` VALUES (1, 'product-1', 9999999), (2, 'product-2', 0);
  31. COMMIT;
  32. -- ----------------------------
  33. -- Table structure for undo_log
  34. -- ----------------------------
  35. DROP TABLE IF EXISTS `undo_log`;
  36. CREATE TABLE `undo_log` (
  37. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  38. `branch_id` bigint(20) NOT NULL,
  39. `xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  40. `context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  41. `rollback_info` longblob NOT NULL,
  42. `log_status` int(11) NOT NULL,
  43. `log_created` datetime(0) NOT NULL,
  44. `log_modified` datetime(0) NOT NULL,
  45. `ext` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  46. PRIMARY KEY (`id`) USING BTREE,
  47. UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
  48. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci;
  49. SET FOREIGN_KEY_CHECKS = 1;