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 authored and GitHub committed 2025-07-23 22:24:44 -07:00
1 parent c72174a43d
commit 54fe47fbca
8 files changed
+145 -5

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ const (
type Notice struct {
ID int64 `xorm:"pk autoincr"`
Type NoticeType
Description string `xorm:"TEXT"`
Description string `xorm:"LONGTEXT"`
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
}