feat: 迁移 Admin Repository 到 MySQL 8 (#79)

This commit is contained in:
chengma
2026-08-10 02:21:31 +08:00
parent 05793e48b3
commit 13cfced80d
29 changed files with 390 additions and 240 deletions
+1 -8
View File
@@ -38,14 +38,7 @@ func TestPaginationCSS_桌面右对齐且窄窗口不遮挡内容(t *testing.T)
// 六个主页面都走一次真实路由和模板渲染。
// 这样模板字段写错或新增列漏接时,测试阶段就会失败,不必等人工点页面。
func TestMainPagesReturnOK(t *testing.T) {
db, err := repository.Open(t.TempDir())
if err != nil {
t.Fatalf("打开测试数据库失败: %v", err)
}
defer db.Close()
if err := repository.Migrate(db); err != nil {
t.Fatalf("迁移测试数据库失败: %v", err)
}
db := newMySQLTestDB(t)
router, err := newRouter(db)
if err != nil {