Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
loit-shardingsphere-seata-example
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
loit-Infrastructure-example
loit-shardingsphere-seata-example
Commits
8546626a
提交
8546626a
authored
2月 13, 2020
作者:
陈世营
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update mybatis config
上级
68a6e40e
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
428 行增加
和
291 行删除
+428
-291
application-master-slave.yml
...eata-main/src/main/resources/application-master-slave.yml
+104
-0
demo_ds.sql
...rdingsphere-seata-main/src/main/resources/sql/demo_ds.sql
+108
-0
demo_ds_0 20190808 1604.sql
...a-main/src/main/resources/sql/demo_ds_0 20190808 1604.sql
+0
-146
demo_ds_0.sql
...ingsphere-seata-main/src/main/resources/sql/demo_ds_0.sql
+108
-0
demo_ds_1 20190808 1605.sql
...a-main/src/main/resources/sql/demo_ds_1 20190808 1605.sql
+0
-145
demo_ds_1.sql
...ingsphere-seata-main/src/main/resources/sql/demo_ds_1.sql
+108
-0
没有找到文件。
loit-shardingsphere-seata-main/src/main/resources/application-master-slave.yml
0 → 100644
浏览文件 @
8546626a
server
:
port
:
8090
spring
:
application
:
name
:
loit-shardingshere
cloud
:
nacos
:
discovery
:
# Nacos 注册中心地址
server-addr
:
39.100.254.140:8103
namespace
:
3ac84119-5558-4bf8-b309-034dd0e458e0
aop
:
#使用CGLIB来实现AOP的时候
proxy-target-class
:
true
shardingsphere
:
datasource
:
names
:
ds-master,ds-slave-0
ds-master
:
type
:
com.alibaba.druid.pool.DruidDataSource
# type: com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
abcd1234A!
jdbc-url
:
jdbc:mysql://39.98.202.173:3306/demo_ds?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
url
:
jdbc:mysql://39.98.202.173:3306/demo_ds?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
filters
:
stat,wall,log4j
maxActive
:
20
initialSize
:
1
maxWait
:
60000
minIdle
:
1
timeBetweenEvictionRunsMillis
:
60000
minEvictableIdleTimeMillis
:
300000
validationQuery
:
select 'x'
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
poolPreparedStatements
:
true
maxOpenPreparedStatements
:
20
connection-properties
:
druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
ds-slave-0
:
type
:
com.alibaba.druid.pool.DruidDataSource
# type: com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
abcd1234A!
jdbc-url
:
jdbc:mysql://39.98.202.173:3306/demo_ds_0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
url
:
jdbc:mysql://39.98.202.173:3306/demo_ds_0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
filters
:
stat,wall,log4j
maxActive
:
20
initialSize
:
1
maxWait
:
60000
minIdle
:
1
timeBetweenEvictionRunsMillis
:
60000
minEvictableIdleTimeMillis
:
300000
validationQuery
:
select 'x'
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
poolPreparedStatements
:
true
maxOpenPreparedStatements
:
20
connection-properties
:
druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
masterslave
:
load-balance-algorithm-type
:
round_robin
name
:
ds_ms
master-data-source-name
:
ds-master
#slave-data-source-names: ds-slave-0,ds-slave-1
slave-data-source-names
:
ds-slave-0
#mybatis:
# mapper-locations: classpath:/mapper/**/*.xml #把xml文件放在com.XX.mapper.*中可能会出现找到的问题,这里把他放在resource下的mapper中
# #实体扫描,多个package用逗号或者分号分隔
# typeAliasesPackage: com.company.spring.boot.shardingsphere.seata.modules.entity #这里是实体类的位置
# configuration:
# map-underscore-to-camel-case: true
# cache-enabled: false
mybatis-plus
:
# datasource: dataSource
mapper-locations
:
classpath:/mapper/**/*.xml
#实体扫描,多个package用逗号或者分号分隔
type-aliases-package
:
com.loit.shardingsphere.seata.modules.entity
#typeEnumsPackage: com.baomidou.springboot.entity.enums
global-config
:
#主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID", 4:"该类型为未设置主键类型", 5:"字符串全局唯一ID";
id-type
:
2
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
field-strategy
:
1
#驼峰下划线转换
db-column-underline
:
true
#刷新mapper 调试神器
refresh-mapper
:
true
#数据库大写下划线转换
#capital-mode: true
#逻辑删除配置(下面3个配置)
logic-delete-value
:
0
logic-not-delete-value
:
1
# SQL 解析缓存,开启后多租户 @SqlParser 注解生效
sql-parser-cache
:
true
configuration
:
map-underscore-to-camel-case
:
true
cache-enabled
:
false
configuration-properties
:
dbType
:
mysql
#设置全局属性用于控制数据库的类型
\ No newline at end of file
loit-shardingsphere-seata-main/src/main/resources/sql/demo_ds.sql
0 → 100644
浏览文件 @
8546626a
/*
Navicat MySQL Data Transfer
Source Server : 39.98.202.173seata
Source Server Version : 50725
Source Host : 39.98.202.173:3306
Source Database : demo_ds
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2020-02-13 22:37:45
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order`
;
CREATE
TABLE
"t_order"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for t_order_0
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_0`
;
CREATE
TABLE
"t_order_0"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for t_order_1
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_1`
;
CREATE
TABLE
"t_order_1"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for t_order_item
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item`
;
CREATE
TABLE
"t_order_item"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for t_order_item_0
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item_0`
;
CREATE
TABLE
"t_order_item_0"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for t_order_item_1
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item_1`
;
CREATE
TABLE
"t_order_item_1"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP
TABLE
IF
EXISTS
`undo_log`
;
CREATE
TABLE
"undo_log"
(
"id"
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'increment id'
,
"branch_id"
bigint
(
20
)
NOT
NULL
COMMENT
'branch transaction id'
,
"xid"
varchar
(
100
)
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
NOT
NULL
COMMENT
'create datetime'
,
"log_modified"
datetime
NOT
NULL
COMMENT
'modify datetime'
,
PRIMARY
KEY
(
"id"
),
UNIQUE
KEY
"ux_undo_log"
(
"xid"
,
"branch_id"
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
306
DEFAULT
CHARSET
=
utf8
COMMENT
=
'AT transaction mode undo table'
;
loit-shardingsphere-seata-main/src/main/resources/sql/demo_ds_0 20190808 1604.sql
deleted
100644 → 0
浏览文件 @
68a6e40e
-- Script was generated by Devart dbForge Studio for MySQL, Version 6.0.315.0
-- Product home page: http://www.devart.com/dbforge/mysql/studio
-- Script date 2019/8/8 16:04:29
-- Server version: 5.7.17-log
-- Client version: 4.1
--
-- Disable foreign keys
--
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */
;
--
-- Set character set the client will use to send SQL statements to the server
--
SET
NAMES
'utf8'
;
--
-- Set default database
--
USE
demo_ds_0
;
--
-- Definition for table t_order_0
--
DROP
TABLE
IF
EXISTS
t_order_0
;
CREATE
TABLE
t_order_0
(
id
VARCHAR
(
64
)
NOT
NULL
COMMENT
'主键'
,
order_id
BIGINT
(
20
)
NOT
NULL
,
user_id
INT
(
11
)
NOT
NULL
,
status
VARCHAR
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
INNODB
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Definition for table t_order_1
--
DROP
TABLE
IF
EXISTS
t_order_1
;
CREATE
TABLE
t_order_1
(
id
VARCHAR
(
64
)
NOT
NULL
COMMENT
'主键'
,
order_id
BIGINT
(
20
)
NOT
NULL
,
user_id
INT
(
11
)
NOT
NULL
,
status
VARCHAR
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
INNODB
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Definition for table t_order_item_0
--
DROP
TABLE
IF
EXISTS
t_order_item_0
;
CREATE
TABLE
t_order_item_0
(
id
VARCHAR
(
64
)
NOT
NULL
COMMENT
'主键'
,
order_item_id
BIGINT
(
20
)
NOT
NULL
,
order_id
BIGINT
(
20
)
NOT
NULL
,
user_id
INT
(
11
)
NOT
NULL
,
status
VARCHAR
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
INNODB
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Definition for table t_order_item_1
--
DROP
TABLE
IF
EXISTS
t_order_item_1
;
CREATE
TABLE
t_order_item_1
(
id
VARCHAR
(
64
)
NOT
NULL
COMMENT
'主键'
,
order_item_id
BIGINT
(
20
)
NOT
NULL
,
order_id
BIGINT
(
20
)
NOT
NULL
,
user_id
INT
(
11
)
NOT
NULL
,
status
VARCHAR
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
INNODB
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Definition for table undo_log
--
DROP
TABLE
IF
EXISTS
undo_log
;
CREATE
TABLE
undo_log
(
id
BIGINT
(
20
)
NOT
NULL
AUTO_INCREMENT
,
branch_id
BIGINT
(
20
)
NOT
NULL
,
xid
VARCHAR
(
100
)
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
,
context
VARCHAR
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
),
UNIQUE
INDEX
ux_undo_log
(
xid
,
branch_id
)
)
ENGINE
=
INNODB
AUTO_INCREMENT
=
1
AVG_ROW_LENGTH
=
16384
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Dumping data for table t_order_0
--
-- Table demo_ds_0.t_order_0 does not contain any data (it is empty)
--
-- Dumping data for table t_order_1
--
-- Table demo_ds_0.t_order_1 does not contain any data (it is empty)
--
-- Dumping data for table t_order_item_0
--
-- Table demo_ds_0.t_order_item_0 does not contain any data (it is empty)
--
-- Dumping data for table t_order_item_1
--
-- Table demo_ds_0.t_order_item_1 does not contain any data (it is empty)
--
-- Dumping data for table undo_log
--
-- Table demo_ds_0.undo_log does not contain any data (it is empty)
--
-- Enable foreign keys
--
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */
;
\ No newline at end of file
loit-shardingsphere-seata-main/src/main/resources/sql/demo_ds_0.sql
0 → 100644
浏览文件 @
8546626a
/*
Navicat MySQL Data Transfer
Source Server : 39.98.202.173seata
Source Server Version : 50725
Source Host : 39.98.202.173:3306
Source Database : demo_ds_0
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2020-02-13 22:37:10
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order`
;
CREATE
TABLE
"t_order"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_0
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_0`
;
CREATE
TABLE
"t_order_0"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_1
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_1`
;
CREATE
TABLE
"t_order_1"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_item
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item`
;
CREATE
TABLE
"t_order_item"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_item_0
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item_0`
;
CREATE
TABLE
"t_order_item_0"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_item_1
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item_1`
;
CREATE
TABLE
"t_order_item_1"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP
TABLE
IF
EXISTS
`undo_log`
;
CREATE
TABLE
"undo_log"
(
"id"
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'increment id'
,
"branch_id"
bigint
(
20
)
NOT
NULL
COMMENT
'branch transaction id'
,
"xid"
varchar
(
100
)
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
NOT
NULL
COMMENT
'create datetime'
,
"log_modified"
datetime
NOT
NULL
COMMENT
'modify datetime'
,
PRIMARY
KEY
(
"id"
),
UNIQUE
KEY
"ux_undo_log"
(
"xid"
,
"branch_id"
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
306
DEFAULT
CHARSET
=
utf8
COMMENT
=
'AT transaction mode undo table'
;
loit-shardingsphere-seata-main/src/main/resources/sql/demo_ds_1 20190808 1605.sql
deleted
100644 → 0
浏览文件 @
68a6e40e
-- Script was generated by Devart dbForge Studio for MySQL, Version 6.0.315.0
-- Product home page: http://www.devart.com/dbforge/mysql/studio
-- Script date 2019/8/8 16:05:23
-- Server version: 5.7.17-log
-- Client version: 4.1
--
-- Disable foreign keys
--
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */
;
--
-- Set character set the client will use to send SQL statements to the server
--
SET
NAMES
'utf8'
;
--
-- Set default database
--
USE
demo_ds_1
;
--
-- Definition for table t_order_0
--
DROP
TABLE
IF
EXISTS
t_order_0
;
CREATE
TABLE
t_order_0
(
id
VARCHAR
(
64
)
NOT
NULL
COMMENT
'主键'
,
order_id
BIGINT
(
20
)
NOT
NULL
,
user_id
INT
(
11
)
NOT
NULL
,
status
VARCHAR
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
INNODB
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Definition for table t_order_1
--
DROP
TABLE
IF
EXISTS
t_order_1
;
CREATE
TABLE
t_order_1
(
id
VARCHAR
(
64
)
NOT
NULL
COMMENT
'主键'
,
order_id
BIGINT
(
20
)
NOT
NULL
,
user_id
INT
(
11
)
NOT
NULL
,
status
VARCHAR
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
INNODB
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Definition for table t_order_item_0
--
DROP
TABLE
IF
EXISTS
t_order_item_0
;
CREATE
TABLE
t_order_item_0
(
id
VARCHAR
(
64
)
NOT
NULL
COMMENT
'主键'
,
order_item_id
BIGINT
(
20
)
NOT
NULL
,
order_id
BIGINT
(
20
)
NOT
NULL
,
user_id
INT
(
11
)
NOT
NULL
,
status
VARCHAR
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
INNODB
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Definition for table t_order_item_1
--
DROP
TABLE
IF
EXISTS
t_order_item_1
;
CREATE
TABLE
t_order_item_1
(
id
VARCHAR
(
64
)
NOT
NULL
COMMENT
'主键'
,
order_item_id
BIGINT
(
20
)
NOT
NULL
,
order_id
BIGINT
(
20
)
NOT
NULL
,
user_id
INT
(
11
)
NOT
NULL
,
status
VARCHAR
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
INNODB
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Definition for table undo_log
--
DROP
TABLE
IF
EXISTS
undo_log
;
CREATE
TABLE
undo_log
(
id
BIGINT
(
20
)
NOT
NULL
AUTO_INCREMENT
,
branch_id
BIGINT
(
20
)
NOT
NULL
,
xid
VARCHAR
(
100
)
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
,
context
VARCHAR
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
),
UNIQUE
INDEX
ux_undo_log
(
xid
,
branch_id
)
)
ENGINE
=
INNODB
AUTO_INCREMENT
=
3
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
ROW_FORMAT
=
DYNAMIC
;
--
-- Dumping data for table t_order_0
--
-- Table demo_ds_1.t_order_0 does not contain any data (it is empty)
--
-- Dumping data for table t_order_1
--
-- Table demo_ds_1.t_order_1 does not contain any data (it is empty)
--
-- Dumping data for table t_order_item_0
--
-- Table demo_ds_1.t_order_item_0 does not contain any data (it is empty)
--
-- Dumping data for table t_order_item_1
--
-- Table demo_ds_1.t_order_item_1 does not contain any data (it is empty)
--
-- Dumping data for table undo_log
--
-- Table demo_ds_1.undo_log does not contain any data (it is empty)
--
-- Enable foreign keys
--
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */
;
\ No newline at end of file
loit-shardingsphere-seata-main/src/main/resources/sql/demo_ds_1.sql
0 → 100644
浏览文件 @
8546626a
/*
Navicat MySQL Data Transfer
Source Server : 39.98.202.173seata
Source Server Version : 50725
Source Host : 39.98.202.173:3306
Source Database : demo_ds_1
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2020-02-13 22:37:31
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order`
;
CREATE
TABLE
"t_order"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_0
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_0`
;
CREATE
TABLE
"t_order_0"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_1
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_1`
;
CREATE
TABLE
"t_order_1"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_item
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item`
;
CREATE
TABLE
"t_order_item"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_item_0
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item_0`
;
CREATE
TABLE
"t_order_item_0"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for t_order_item_1
-- ----------------------------
DROP
TABLE
IF
EXISTS
`t_order_item_1`
;
CREATE
TABLE
"t_order_item_1"
(
"id"
varchar
(
64
)
NOT
NULL
COMMENT
'主键'
,
"order_item_id"
bigint
(
20
)
NOT
NULL
,
"order_id"
bigint
(
20
)
NOT
NULL
,
"user_id"
int
(
11
)
NOT
NULL
,
"status"
varchar
(
50
)
DEFAULT
NULL
,
PRIMARY
KEY
(
"id"
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP
TABLE
IF
EXISTS
`undo_log`
;
CREATE
TABLE
"undo_log"
(
"id"
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'increment id'
,
"branch_id"
bigint
(
20
)
NOT
NULL
COMMENT
'branch transaction id'
,
"xid"
varchar
(
100
)
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
NOT
NULL
COMMENT
'create datetime'
,
"log_modified"
datetime
NOT
NULL
COMMENT
'modify datetime'
,
PRIMARY
KEY
(
"id"
),
UNIQUE
KEY
"ux_undo_log"
(
"xid"
,
"branch_id"
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
309
DEFAULT
CHARSET
=
utf8
COMMENT
=
'AT transaction mode undo table'
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论