You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

order.sql 3.6 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. -- Licensed to the Apache Software Foundation (ASF) under one or more
  2. -- contributor license agreements. See the NOTICE file distributed with
  3. -- this work for additional information regarding copyright ownership.
  4. -- The ASF licenses this file to You under the Apache License, Version 2.0
  5. -- (the "License"); you may not use this file except in compliance with
  6. -- the License. You may obtain a copy of the License at
  7. --
  8. -- http://www.apache.org/licenses/LICENSE-2.0
  9. --
  10. -- Unless required by applicable law or agreed to in writing, software
  11. -- distributed under the License is distributed on an "AS IS" BASIS,
  12. -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. -- See the License for the specific language governing permissions and
  14. -- limitations under the License.
  15. CREATE database if NOT EXISTS `seata_client` default character set utf8mb4 collate utf8mb4_unicode_ci;
  16. USE `seata_client`;
  17. SET NAMES utf8mb4;
  18. SET FOREIGN_KEY_CHECKS = 0;
  19. CREATE TABLE IF NOT EXISTS `order_tbl` (
  20. `id` int(11) NOT NULL AUTO_INCREMENT,
  21. `user_id` varchar(255) DEFAULT NULL,
  22. `commodity_code` varchar(255) DEFAULT NULL,
  23. `count` int(11) DEFAULT '0',
  24. `money` int(11) DEFAULT '0',
  25. `descs` varchar(255) DEFAULT '',
  26. PRIMARY KEY (`id`)
  27. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  28. INSERT INTO `seata_client`.`order_tbl` (`id`, `user_id`, `commodity_code`, `count`, `money`, `descs`) VALUES (1, 'NO-100001', 'C100000', 100, 10, 'init desc');
  29. DROP TABLE IF EXISTS `undo_log`;
  30. CREATE TABLE `undo_log` (
  31. `id` bigint NOT NULL AUTO_INCREMENT,
  32. `branch_id` bigint NOT NULL,
  33. `xid` varchar(100) NOT NULL,
  34. `context` varchar(128) NOT NULL,
  35. `rollback_info` longblob NOT NULL,
  36. `log_status` int NOT NULL,
  37. `log_created` datetime NOT NULL,
  38. `log_modified` datetime NOT NULL,
  39. `ext` varchar(100) DEFAULT NULL,
  40. PRIMARY KEY (`id`),
  41. KEY `idx_unionkey` (`xid`,`branch_id`)
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  43. CREATE database if NOT EXISTS `seata_client1` default character set utf8mb4 collate utf8mb4_unicode_ci;
  44. USE `seata_client1`;
  45. SET NAMES utf8mb4;
  46. SET FOREIGN_KEY_CHECKS = 0;
  47. CREATE TABLE IF NOT EXISTS `order_tbl` (
  48. `id` int(11) NOT NULL AUTO_INCREMENT,
  49. `user_id` varchar(255) DEFAULT NULL,
  50. `commodity_code` varchar(255) DEFAULT NULL,
  51. `count` int(11) DEFAULT '0',
  52. `money` int(11) DEFAULT '0',
  53. `descs` varchar(255) DEFAULT '',
  54. PRIMARY KEY (`id`)
  55. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  56. INSERT INTO `seata_client1`.`order_tbl` (`id`, `user_id`, `commodity_code`, `count`, `money`, `descs`) VALUES (1, 'NO-100001', 'C100000', 100, 10, 'init desc');
  57. DROP TABLE IF EXISTS `undo_log`;
  58. CREATE TABLE `undo_log` (
  59. `id` bigint NOT NULL AUTO_INCREMENT,
  60. `branch_id` bigint NOT NULL,
  61. `xid` varchar(100) NOT NULL,
  62. `context` varchar(128) NOT NULL,
  63. `rollback_info` longblob NOT NULL,
  64. `log_status` int NOT NULL,
  65. `log_created` datetime NOT NULL,
  66. `log_modified` datetime NOT NULL,
  67. `ext` varchar(100) DEFAULT NULL,
  68. PRIMARY KEY (`id`),
  69. KEY `idx_unionkey` (`xid`,`branch_id`)
  70. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;