Browse Source

db: fix wrong column type of `login_source` (#6283)

ᴜɴᴋɴᴡᴏɴ 4 years ago
parent
commit
4ecd588776
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 1
      internal/db/login_sources.go

+ 1 - 0
CHANGELOG.md

@@ -11,6 +11,7 @@ All notable changes to Gogs are documented in this file.
 ### Fixed
 
 - The `updated_at` field is now correctly updated when updates an issue. [#6209](https://github.com/gogs/gogs/issues/6209)
+- Fixed a regression which created `login_source.cfg` column to have `VARCHAR(255)` instead of `TEXT` in MySQL. [#6280](https://github.com/gogs/gogs/issues/6280)
 
 ### Removed
 

+ 1 - 1
internal/db/login_sources.go

@@ -51,7 +51,7 @@ type LoginSource struct {
 	IsActived bool        `xorm:"NOT NULL DEFAULT false" gorm:"NOT NULL"`
 	IsDefault bool        `xorm:"DEFAULT false"`
 	Config    interface{} `xorm:"-" gorm:"-"`
-	RawConfig string      `xorm:"TEXT cfg" gorm:"COLUMN:cfg"`
+	RawConfig string      `xorm:"TEXT cfg" gorm:"COLUMN:cfg;TYPE:TEXT"`
 
 	Created     time.Time `xorm:"-" gorm:"-" json:"-"`
 	CreatedUnix int64