Skip to content

Commit

Permalink
fix: resolve dind restart container database is locked (#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangSetSail authored Oct 27, 2022
1 parent b5464a9 commit 45399bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func CreateManager(config config.Config) (*Manager, error) {
if err != nil {
return nil, err
}
db.Exec("PRAGMA journal_mode = WAL")
}
if config.ShowSQL {
db = db.Debug()
Expand Down Expand Up @@ -196,7 +197,7 @@ func (m *Manager) CheckTable() {
logrus.Infof("auto create cockroachdb table %s to db success", md.TableName())
}
}
if m.config.DBType == "sqlite"{
if m.config.DBType == "sqlite" {
err := m.db.CreateTable(md).Error
if err != nil {
logrus.Errorf("auto create sqlite table %s to db error."+err.Error(), md.TableName())
Expand Down

0 comments on commit 45399bb

Please sign in to comment.