File tree Expand file tree Collapse file tree 6 files changed +7
-23
lines changed Expand file tree Collapse file tree 6 files changed +7
-23
lines changed Original file line number Diff line number Diff line change @@ -258,12 +258,12 @@ type Comment struct {
258
258
CommitID int64
259
259
Line int64 // - previous line / + proposed line
260
260
TreePath string
261
- Content string `xorm:"LONGTEXT "`
261
+ Content string `xorm:"TEXT "`
262
262
RenderedContent string `xorm:"-"`
263
263
264
264
// Path represents the 4 lines of code cemented by this comment
265
265
Patch string `xorm:"-"`
266
- PatchQuoted string `xorm:"LONGTEXT patch"`
266
+ PatchQuoted string `xorm:"TEXT patch"`
267
267
268
268
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
269
269
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ type ContentHistory struct {
24
24
IssueID int64 `xorm:"INDEX"`
25
25
CommentID int64 `xorm:"INDEX"`
26
26
EditedUnix timeutil.TimeStamp `xorm:"INDEX"`
27
- ContentText string `xorm:"LONGTEXT "`
27
+ ContentText string `xorm:"TEXT "`
28
28
IsFirstCreated bool
29
29
IsDeleted bool
30
30
}
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ type Issue struct {
116
116
OriginalAuthor string
117
117
OriginalAuthorID int64 `xorm:"index"`
118
118
Title string `xorm:"name"`
119
- Content string `xorm:"LONGTEXT "`
119
+ Content string `xorm:"TEXT "`
120
120
RenderedContent string `xorm:"-"`
121
121
Labels []* Label `xorm:"-"`
122
122
MilestoneID int64 `xorm:"INDEX"`
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ var migrations = []Migration{
339
339
// v190 -> v191
340
340
NewMigration ("Add agit flow pull request support" , addAgitFlowPullRequest ),
341
341
// v191 -> v192
342
- NewMigration ("Alter issue/comment table TEXT fields to LONGTEXT" , alterIssueAndCommentTextFieldsToLongText ),
342
+ NewMigration ("Alter issue/comment table TEXT fields to LONGTEXT (nop) " , alterIssueAndCommentTextFieldsToLongText ),
343
343
// v192 -> v193
344
344
NewMigration ("RecreateIssueResourceIndexTable to have a primary key instead of an unique index" , recreateIssueResourceIndexTable ),
345
345
// v193 -> v194
Original file line number Diff line number Diff line change 5
5
package migrations
6
6
7
7
import (
8
- "code.gitea.io/gitea/modules/setting"
9
-
10
8
"xorm.io/xorm"
11
9
)
12
10
13
11
func alterIssueAndCommentTextFieldsToLongText (x * xorm.Engine ) error {
14
- sess := x .NewSession ()
15
- defer sess .Close ()
16
- if err := sess .Begin (); err != nil {
17
- return err
18
- }
19
-
20
- if setting .Database .UseMySQL {
21
- if _ , err := sess .Exec ("ALTER TABLE `issue` CHANGE `content` `content` LONGTEXT" ); err != nil {
22
- return err
23
- }
24
- if _ , err := sess .Exec ("ALTER TABLE `comment` CHANGE `content` `content` LONGTEXT, CHANGE `patch` `patch` LONGTEXT" ); err != nil {
25
- return err
26
- }
27
- }
28
- return sess .Commit ()
12
+ return nil
29
13
}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ func addTableIssueContentHistory(x *xorm.Engine) error {
19
19
IssueID int64 `xorm:"INDEX"`
20
20
CommentID int64 `xorm:"INDEX"`
21
21
EditedUnix timeutil.TimeStamp `xorm:"INDEX"`
22
- ContentText string `xorm:"LONGTEXT "`
22
+ ContentText string `xorm:"TEXT "`
23
23
IsFirstCreated bool
24
24
IsDeleted bool
25
25
}
You can’t perform that action at this time.
0 commit comments