diff options
author | Norwin <noerw@users.noreply.github.com> | 2021-02-19 10:52:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-19 12:52:11 +0200 |
commit | d38ae597e19f58bcd732717fe09c1ea97ab8bb12 (patch) | |
tree | 839f0b3c92a4b98a7be3b8aa316925615c16c76e /models/migrations | |
parent | 6a696b93b1e7e9dc1e7cc51d4eab2932b072170f (diff) | |
download | gitea-d38ae597e19f58bcd732717fe09c1ea97ab8bb12.tar.gz gitea-d38ae597e19f58bcd732717fe09c1ea97ab8bb12.zip |
Add UI to delete tracked times (#14100)
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'models/migrations')
-rw-r--r-- | models/migrations/migrations.go | 2 | ||||
-rw-r--r-- | models/migrations/v173.go | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 740e8cb3ee..4fc737e1bf 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -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 diff --git a/models/migrations/v173.go b/models/migrations/v173.go new file mode 100644 index 0000000000..dd4589066d --- /dev/null +++ b/models/migrations/v173.go @@ -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 +} |