mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-23 03:24:13 +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>
22 lines
499 B
Go
22 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
|
|
}
|