1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-03 08:08:36 +00:00

Change some columns from text to longtext and fix column wrong type caused by xorm (#35141)

This PR upgrade xorm to v1.3.10 which fixed a bug when both `longtext
json` tags in the struct field. The `longtext` will be ignored and
`json` will be considered as `text`.

A migration has been introduced to modify the column directly to
longtext. And another two columns should also be migrated from text to
longtext.

All these changes only affect mysql database because for other databases
Gitea supported, text is the same as longtext.

Fix #27244 
Fix #34764 
Fix #35042
This commit is contained in:
Lunny Xiao
2025-07-24 13:24:44 +08:00
committed by GitHub
parent c72174a43d
commit 54fe47fbca
8 changed files with 145 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ type PackageProperty struct {
RefType PropertyType `xorm:"INDEX NOT NULL"`
RefID int64 `xorm:"INDEX NOT NULL"`
Name string `xorm:"INDEX NOT NULL"`
Value string `xorm:"TEXT NOT NULL"`
Value string `xorm:"LONGTEXT NOT NULL"`
}
// InsertProperty creates a property