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:
@ -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
22
models/migrations/v173.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user