forked from plusone/simple-jdbc
refactor: 重构单元测试中的表和数据的初始化
将表结构和初始数据的SQL放在 *.sql 文件中,使单元测试代码更清晰。 Reviewed-on: http://zhouxy.xyz:3000/ZhouXY108/simple-jdbc/pulls/4 Co-authored-by: ZhouXY108 <luquanlion@outlook.com> Co-committed-by: ZhouXY108 <luquanlion@outlook.com>
This commit is contained in:
10
src/test/resources/schema.sql
Normal file
10
src/test/resources/schema.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE sys_account (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY
|
||||
,username VARCHAR(255) NOT NULL
|
||||
,account_status VARCHAR(2) NOT NULL
|
||||
,create_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
,created_by BIGINT NOT NULL
|
||||
,update_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
,updated_by BIGINT DEFAULT NULL
|
||||
,version BIGINT NOT NULL DEFAULT 0
|
||||
)
|
||||
Reference in New Issue
Block a user