1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Add UI to delete tracked times (#14100)

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Norwin
2021-02-19 10:52:11 +00:00
committed by GitHub
parent 6a696b93b1
commit d38ae597e1
13 changed files with 123 additions and 4 deletions

View File

@ -292,6 +292,8 @@ var migrations = []Migration{
NewMigration("Add Sorting to ProjectBoard table", addSortingColToProjectBoard),
// v172 -> v173
NewMigration("Add sessions table for go-chi/session", addSessionTable),
// v173 -> v174
NewMigration("Add time_id column to Comment", addTimeIDCommentColumn),
}
// GetCurrentDBVersion returns the current db version

22
models/migrations/v173.go Normal file
View File

@ -0,0 +1,22 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package migrations
import (
"fmt"
"xorm.io/xorm"
)
func addTimeIDCommentColumn(x *xorm.Engine) error {
type Comment struct {
TimeID int64
}
if err := x.Sync2(new(Comment)); err != nil {
return fmt.Errorf("Sync2: %v", err)
}
return nil
}