From 7db9b8b9a81e65357302cc9c9a3000e6ffe95ff2 Mon Sep 17 00:00:00 2001 From: li1234yun Date: Wed, 17 Jun 2020 20:03:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=90=86=E7=94=B1=E5=90=8C=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GORM-V2-Release-Note-Draft.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GORM-V2-Release-Note-Draft.md b/GORM-V2-Release-Note-Draft.md index 49b667e..2b95deb 100644 --- a/GORM-V2-Release-Note-Draft.md +++ b/GORM-V2-Release-Note-Draft.md @@ -47,7 +47,7 @@ func init() { // during initialization, you can use `gorm.Config` to change few configurations, e.g: NowFunc, which no longer allow modification through global variables db, err := gorm.Open(sqlite.Open("gorm.db"), &gorm.Config{NowFunc: func() time.Time { return time.Now().Local() }}) db, err := gorm.Open(mysql.Open("gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True"), &gorm.Config{}) - db, err := gorm.Open(postgres.Open("user=gorm password=gorm DB.name=gorm port=9920 TimeZone=Asia/Shanghai"), &gorm.Config{}) + db, err := gorm.Open(postgres.Open("user=gorm password=gorm dbname=gorm port=9920 TimeZone=Asia/Shanghai"), &gorm.Config{}) // most CRUD API kept compatibility db.AutoMigrate(&Product{})