Skip to content

Commit 236b388

Browse files
author
hewei
committed
增加测试用例
1 parent 01f84c5 commit 236b388

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/test/resources/scripts/ExampleEnhancedPlugin/init.sql

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,24 @@ INSERT INTO `tb` VALUES ('6', 'f6', '100');
3838
INSERT INTO `tb` VALUES ('7', 'f7', '100');
3939
INSERT INTO `tb` VALUES ('8', 'f8', '100');
4040
INSERT INTO `tb` VALUES ('9', 'f9', '100');
41-
INSERT INTO `tb` VALUES ('10', 'f10', '100');
41+
INSERT INTO `tb` VALUES ('10', 'f10', '100');
42+
43+
-- ----------------------------
44+
-- Table structure for tb_all
45+
-- ----------------------------
46+
DROP TABLE IF EXISTS `tb_all`;
47+
CREATE TABLE `tb_all` (
48+
`key1` bigint(20) NOT NULL COMMENT '注释1',
49+
`key2` varchar(20) NOT NULL COMMENT '注释2',
50+
`field1` varchar(255) DEFAULT NULL COMMENT '注释3',
51+
`field2` bigint(20) NOT NULL COMMENT '注释4',
52+
`field3` longtext COMMENT '注释5',
53+
PRIMARY KEY (`key1`, `key2`)
54+
);
55+
56+
-- ----------------------------
57+
-- Records of tb_all
58+
-- ----------------------------
59+
INSERT INTO `tb_all` VALUES ('1', 'key1', 'f1', '1', 'b1');
60+
INSERT INTO `tb_all` VALUES ('2', 'key2', 'f2', '1', 'b2');
61+
INSERT INTO `tb_all` VALUES ('3', 'key3', 'f3', '1', 'b3');

src/test/resources/scripts/ExampleEnhancedPlugin/mybatis-generator-with-ModelColumnPlugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@
4949
<table tableName="tb">
5050
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
5151
</table>
52+
<table tableName="tb_all"/>
5253
</context>
5354
</generatorConfiguration>

0 commit comments

Comments
 (0)