Skip to content

Commit

Permalink
fix(core): mysql creates trouble at bootup. Use sqlite as the default…
Browse files Browse the repository at this point in the history
… database. Only connect to mysql when opt in.
  • Loading branch information
Reasno committed Feb 24, 2021
1 parent 5031d22 commit 0a81de5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions default_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ redis:
DB: 0
gorm:
default:
database: mysql
dsn: root@tcp(127.0.0.1:3306)/app?charset=utf8mb4&parseTime=True&loc=Local
database: sqlite
dsn: ":memory:"
`

// ProvideConfig is the default ConfigProvider for package Core.
Expand Down
2 changes: 1 addition & 1 deletion otgorm/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ func Example() {
})
fmt.Println(err)
// Output:
// mysql
// sqlite
// <nil>
}

0 comments on commit 0a81de5

Please sign in to comment.