Merge remote-tracking branch 'origin/1.0.1' into 1.0.1

pull/78/head
wantoper 2025-05-16 15:28:06 +08:00
commit 7fbd615b32
3 changed files with 25 additions and 20 deletions

View File

@ -135,7 +135,12 @@ func Apply(cfg map[string]any, logger *public.Logger) (map[string]any, error) {
var skipCheck bool
if cfg["skip_check"] == nil {
// 默认跳过预检查
skipCheck = true
// cf 默认不跳过预检查
if providerStr == "cloudflare" {
skipCheck = false
}
} else {
switch v := cfg["skip_check"].(type) {
case int:

View File

@ -11,11 +11,11 @@ import (
func EnsureDatabaseWithTables(targetDBPath string, baseDBPath string, tables []string) error {
// 1. 检查数据库是否存在
if _, err := os.Stat(targetDBPath); err == nil {
fmt.Printf("数据库 %s 已存在,跳过迁移。\n", targetDBPath)
// fmt.Printf("数据库 %s 已存在,跳过迁移。\n", targetDBPath)
return nil
}
fmt.Printf("数据库 %s 不存在,开始从基础数据库迁移表...\n", targetDBPath)
// fmt.Printf("数据库 %s 不存在,开始从基础数据库迁移表...\n", targetDBPath)
// 2. 打开源数据库(只读)和目标数据库(新建)
baseDB, err := sql.Open("sqlite", baseDBPath)
@ -71,7 +71,7 @@ func EnsureDatabaseWithTables(targetDBPath string, baseDBPath string, tables []s
rows.Close()
}
fmt.Println("迁移完成。")
// fmt.Println("迁移完成。")
return nil
}