Files

25 lines
488 B
Go
Raw Permalink Normal View History

2020-09-05 19:38:54 +02:00
// Copyright 2020 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
2020-09-05 19:38:54 +02:00
2025-06-27 07:59:55 +02:00
package v1_13
2020-09-05 19:38:54 +02:00
import (
"fmt"
"code.gitea.io/gitea/modules/timeutil"
"xorm.io/xorm"
)
2022-11-02 16:54:36 +08:00
func AddCreatedAndUpdatedToMilestones(x *xorm.Engine) error {
2020-09-05 19:38:54 +02:00
type Milestone struct {
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
}
2023-08-13 21:17:21 +02:00
if err := x.Sync(new(Milestone)); err != nil {
return fmt.Errorf("Sync: %w", err)
2020-09-05 19:38:54 +02:00
}
return nil
}