mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 12:07:51 +00:00
1. drop comment.commit_id 2. refactor templates, remove `dict "." .` from templates
22 lines
496 B
Go
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")
|
|
})
|
|
}
|