mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-23 05:42:33 +09:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
21 lines
512 B
Go
21 lines
512 B
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_23
|
|
|
|
import (
|
|
"code.gitea.io/gitea/models/db"
|
|
"code.gitea.io/gitea/modules/timeutil"
|
|
)
|
|
|
|
func FixMilestoneNoDueDate(x db.EngineMigration) 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
|
|
}
|