mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-07 15:32:11 +00:00
ac49dbe1a2
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
25 lines
532 B
Go
25 lines
532 B
Go
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_13
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"gitea.dev/modelmigration/base"
|
|
"gitea.dev/modules/timeutil"
|
|
)
|
|
|
|
func AddCreatedAndUpdatedToMilestones(_ context.Context, x base.EngineMigration) error {
|
|
type Milestone struct {
|
|
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
|
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
|
|
}
|
|
|
|
if err := x.Sync(new(Milestone)); err != nil {
|
|
return fmt.Errorf("Sync: %w", err)
|
|
}
|
|
return nil
|
|
}
|