diff --git a/go.mod b/go.mod index 10863a54..f037b9ed 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( // 容器镜像 github.com/opencontainers/image-spec v1.1.0 // 辅助类库 - github.com/opentdp/go-helper v0.7.2-0.20240401033254-82dada9d897b + github.com/opentdp/go-helper v0.7.2 // 计划任务 github.com/robfig/cron/v3 v3.0.1 // Go 官方模块 diff --git a/go.sum b/go.sum index 4048a684..6f2d5537 100644 --- a/go.sum +++ b/go.sum @@ -219,8 +219,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opentdp/go-helper v0.7.2-0.20240401033254-82dada9d897b h1:qOmmQAQ0wp04kamUya1/MYFC0vLMRtBgd1DlNLjtzTM= -github.com/opentdp/go-helper v0.7.2-0.20240401033254-82dada9d897b/go.mod h1:bRR6EpSuQNNNwgCSWwwuO90Lh1lUG+PnMa6PFS41mF8= +github.com/opentdp/go-helper v0.7.2 h1:u0DGQ8JxbyApcNPYAurQ1CqOhdUyw7/sVXcDdJP3JQE= +github.com/opentdp/go-helper v0.7.2/go.mod h1:bRR6EpSuQNNNwgCSWwwuO90Lh1lUG+PnMa6PFS41mF8= github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= diff --git a/service/server/origin.go b/service/server/origin.go index d125c661..b9f9f848 100644 --- a/service/server/origin.go +++ b/service/server/origin.go @@ -34,11 +34,9 @@ func dbConnect() { Option: args.Gormio.Option, }) - // 设置默认参数 + // 开启外键约束 if args.Gormio.Type == "sqlite" { dborm.Db.Exec("PRAGMA foreign_keys=ON;") - dborm.Db.Exec("PRAGMA journal_mode=WAL;") - dborm.Db.Exec("PRAGMA busy_timeout=5000;") } // 实施自动迁移