Skip to content

Commit

Permalink
chore: gorm dsn default utf8mb4 (#93)
Browse files Browse the repository at this point in the history
Signed-off-by: rogerogers <rogers@rogerogers.com>
  • Loading branch information
rogerogers authored Oct 28, 2023
1 parent 6f9c032 commit 3480534
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmd/static/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Examples:
Examples:
# Generate DB model code
cwgo model --db_type mysql --dsn "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True&loc=Local"
cwgo model --db_type mysql --dsn "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
`

InitName = "init"
Expand Down
2 changes: 1 addition & 1 deletion example/hex/conf/dev/conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ registry:
password: ""

mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
username: ""
Expand Down
2 changes: 1 addition & 1 deletion example/hex/conf/online/conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ registry:
password: ""

mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
username: ""
Expand Down
2 changes: 1 addition & 1 deletion example/hex/conf/test/conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ registry:
password: ""

mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
username: ""
Expand Down
6 changes: 3 additions & 3 deletions tpl/hertz/server/standard/layout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ layouts:
log_max_backups: 50
mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
Expand All @@ -289,7 +289,7 @@ layouts:
log_max_backups: 50
mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
Expand All @@ -314,7 +314,7 @@ layouts:
log_max_backups: 50
mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
Expand Down
2 changes: 1 addition & 1 deletion tpl/kitex/server/standard/conf_dev_tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body: |-
password: ""
mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
Expand Down
2 changes: 1 addition & 1 deletion tpl/kitex/server/standard/conf_online_tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body: |-
password: ""
mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
Expand Down
2 changes: 1 addition & 1 deletion tpl/kitex/server/standard/conf_test_tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body: |-
password: ""
mysql:
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local"
dsn: "gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
redis:
address: "127.0.0.1:6379"
Expand Down

0 comments on commit 3480534

Please sign in to comment.