Files
wxiaoguang 222136ee71 refactor: clean up pull request comment related code and template dict (#39789)
1. drop comment.commit_id
2. refactor templates, remove `dict "." .` from templates
2026-10-15 23:09:41 +00:00

22 lines
496 B
Go

// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package v29
import (
"context"
"gitea.dev/modelmigration/base"
)
func DropCommentCommitID(ctx context.Context, x base.EngineMigration) error {
exists, err := x.Dialect().IsColumnExist(x.DB(), ctx, "comment", "commit_id")
if err != nil || !exists {
return err
}
return base.EngineTransaction(x, func(sess base.Session) error {
return base.DropTableColumns(sess, "comment", "commit_id")
})
}