mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	enable nolintlint scope requirement add comments to new directives so it's more obvious why they are in place --- I can also toggle the mandatory comments on if that's something of interest. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
		
			
				
	
	
		
			22 lines
		
	
	
		
			490 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			490 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright 2024 The Gitea Authors. All rights reserved.
 | 
						|
// SPDX-License-Identifier: MIT
 | 
						|
 | 
						|
package v1_23
 | 
						|
 | 
						|
import (
 | 
						|
	"code.gitea.io/gitea/modules/timeutil"
 | 
						|
 | 
						|
	"xorm.io/xorm"
 | 
						|
)
 | 
						|
 | 
						|
func FixMilestoneNoDueDate(x *xorm.Engine) error {
 | 
						|
	type Milestone struct {
 | 
						|
		DeadlineUnix timeutil.TimeStamp
 | 
						|
	}
 | 
						|
	// Wednesday, December 1, 9999 12:00:00 AM GMT+00:00
 | 
						|
	_, err := x.Table("milestone").Where("deadline_unix > 253399622400").
 | 
						|
		Cols("deadline_unix").
 | 
						|
		Update(&Milestone{DeadlineUnix: 0})
 | 
						|
	return err
 | 
						|
}
 |