Skip to content

Commit

Permalink
use uft8mb4
Browse files Browse the repository at this point in the history
  • Loading branch information
hasa1K committed May 6, 2024
1 parent de0923d commit 8b25c87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqle/model/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type Model struct {
func NewStorage(user, password, host, port, schema string, debug bool) (*Storage, error) {
log.Logger().Infof("connecting to storage, host: %s, port: %s, user: %s, schema: %s",
host, port, user, schema)
db, err := gorm.Open("mysql", fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8&parseTime=True&loc=Local",
db, err := gorm.Open("mysql", fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=True&loc=Local",
user, password, host, port, schema))
if err != nil {
log.Logger().Errorf("connect to storage failed, error: %v", err)
Expand Down

0 comments on commit 8b25c87

Please sign in to comment.