mirror of
https://github.com/go-gitea/gitea
synced 2024-12-01 10:53:02 +01:00
24b83ff63e
Use zero instead of 9999-12-31 for deadline Fix #32291 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
21 lines
499 B
Go
21 lines
499 B
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_23 //nolint
|
|
|
|
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
|
|
}
|