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:
2025-05-28 20:27:32 +08:00
committed by zhouxy108
parent 0317a9e561
commit 07b5199219
3 changed files with 80 additions and 59 deletions

View 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
)