File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ type Comment struct {
280280
281281	CommitID         int64 
282282	Line             int64          // - previous line / + proposed line 
283- 	TreePath         string         `xorm:"VARCHAR(1024 )"` 
283+ 	TreePath         string         `xorm:"VARCHAR(4096 )"` 
284284	Content          string         `xorm:"LONGTEXT"` 
285285	ContentVersion   int            `xorm:"NOT NULL DEFAULT 0"` 
286286	RenderedContent  template.HTML  `xorm:"-"` 
Original file line number Diff line number Diff line change 33
44package  v1_25
55
6- import  "xorm.io/xorm" 
6+ import  (
7+ 	"code.gitea.io/gitea/models/migrations/base" 
78
8- func  ExtendCommentTreePathLength (x  * xorm.Engine ) error  {
9- 	type  Comment  struct  {
10- 		TreePath  string  `xorm:"VARCHAR(1024)"` 
11- 	}
9+ 	"xorm.io/xorm" 
10+ 	"xorm.io/xorm/schemas" 
11+ )
1212
13- 	return  x .Sync (new (Comment ))
13+ func  ExtendCommentTreePathLength (x  * xorm.Engine ) error  {
14+ 	return  base .ModifyColumn (x , "comment" , & schemas.Column {
15+ 		Name : "tree_path" ,
16+ 		SQLType : schemas.SQLType {
17+ 			Name : "VARCHAR" ,
18+ 		},
19+ 		Length :         4096 ,
20+ 		Nullable :       true , // To keep compatible as nullable 
21+ 		DefaultIsEmpty : true ,
22+ 	})
1423}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments