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 @@ -252,12 +252,12 @@ type Comment struct {
252
252
CommitID int64
253
253
Line int64 // - previous line / + proposed line
254
254
TreePath string
255
- Content string `xorm:"LONGTEXT "`
255
+ Content string `xorm:"TEXT "`
256
256
RenderedContent string `xorm:"-"`
257
257
258
258
// Path represents the 4 lines of code cemented by this comment
259
259
Patch string `xorm:"-"`
260
- PatchQuoted string `xorm:"LONGTEXT patch"`
260
+ PatchQuoted string `xorm:"TEXT patch"`
261
261
262
262
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
263
263
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ type ContentHistory struct {
23
23
IssueID int64 `xorm:"INDEX"`
24
24
CommentID int64 `xorm:"INDEX"`
25
25
EditedUnix timeutil.TimeStamp `xorm:"INDEX"`
26
- ContentText string `xorm:"LONGTEXT "`
26
+ ContentText string `xorm:"TEXT "`
27
27
IsFirstCreated bool
28
28
IsDeleted bool
29
29
}
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ type Issue struct {
112
112
OriginalAuthor string
113
113
OriginalAuthorID int64 `xorm:"index"`
114
114
Title string `xorm:"name"`
115
- Content string `xorm:"LONGTEXT "`
115
+ Content string `xorm:"TEXT "`
116
116
RenderedContent string `xorm:"-"`
117
117
Labels []* Label `xorm:"-"`
118
118
MilestoneID int64 `xorm:"INDEX"`
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ var migrations = []Migration{
335
335
// v190 -> v191
336
336
NewMigration ("Add agit flow pull request support" , addAgitFlowPullRequest ),
337
337
// v191 -> v192
338
- NewMigration ("Alter issue/comment table TEXT fields to LONGTEXT" , alterIssueAndCommentTextFieldsToLongText ),
338
+ NewMigration ("Alter issue/comment table TEXT fields to LONGTEXT (nop) " , alterIssueAndCommentTextFieldsToLongText ),
339
339
// v192 -> v193
340
340
NewMigration ("RecreateIssueResourceIndexTable to have a primary key instead of an unique index" , recreateIssueResourceIndexTable ),
341
341
// 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