增加对访问日志自动分表配置

This commit is contained in:
GoEdgeLab
2022-03-09 10:01:24 +08:00
parent 45adeec1c2
commit f9e32512f6
4 changed files with 61 additions and 5 deletions

View File

@@ -116,3 +116,20 @@ func TestUpgradeSQLData_v0_4_1(t *testing.T) {
}
t.Log("ok")
}
func TestUpgradeSQLData_v0_4_5(t *testing.T) {
db, err := dbs.NewInstanceFromConfig(&dbs.DBConfig{
Driver: "mysql",
Dsn: "root:123456@tcp(127.0.0.1:3306)/db_edge?charset=utf8mb4&timeout=30s",
Prefix: "edge",
})
if err != nil {
t.Fatal(err)
}
err = upgradeV0_4_5(db)
if err != nil {
t.Fatal(err)
}
t.Log("ok")
}