From 4a3dc6c774c96cba6f1e5236b805bffe18f04124 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Tue, 14 Jun 2022 15:47:11 +0800 Subject: db: skip auto migrate for existing "version" table (#7057) --- internal/db/db.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/db/db.go') diff --git a/internal/db/db.go b/internal/db/db.go index 9845bda7..80e2dfc5 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -96,8 +96,9 @@ func Init(w logger.Writer) (*gorm.DB, error) { panic("unreachable") } - // NOTE: GORM has problem detecting existing columns, see https://github.com/gogs/gogs/issues/6091. - // Therefore only use it to create new tables, and do customized migration with future changes. + // NOTE: GORM has problem detecting existing columns, see + // https://github.com/gogs/gogs/issues/6091. Therefore only use it to create new + // tables, and do customized migration with future changes. for _, table := range Tables { if db.Migrator().HasTable(table) { continue -- cgit v1.2.3