Skip to content

Commit

Permalink
fix: 更正Sqlite部分参数
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Apr 7, 2024
1 parent 09304d8 commit 70cfc2a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions dbase/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ func Connect() {
DbName: "wrest.db3",
})

// 设置默认参数
// 开启外键约束
db.Exec("PRAGMA foreign_keys=ON;")
db.Exec("PRAGMA journal_mode=WAL;")
db.Exec("PRAGMA busy_timeout=5000;")

// 实施自动迁移
db.AutoMigrate(
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gorilla/websocket v1.5.1
github.com/importcjj/sensitive v0.0.0-20200106142752-42d1c505be7b
github.com/mitchellh/mapstructure v1.5.0
github.com/opentdp/go-helper v0.7.2-0.20240325030235-ea01c8238bf8
github.com/opentdp/go-helper v0.7.2
github.com/rehiy/one-llm v0.2.1-0.20240329113024-83b57b0c6b06
github.com/robfig/cron/v3 v3.0.1
go.nanomsg.org/mangos/v3 v3.4.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/opentdp/go-helper v0.7.2-0.20240325030235-ea01c8238bf8 h1:eS7ubuAmMFIDH9RFIeRrApFwjOix5lCDyz6kHuxAsCA=
github.com/opentdp/go-helper v0.7.2-0.20240325030235-ea01c8238bf8/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down

0 comments on commit 70cfc2a

Please sign in to comment.