1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 16:44:26 +00:00

Drop the correct deleted branch table (#26028)

There's a typo in #22743
The correct table name is `deleted_branch` not `deleted_branches`
This commit is contained in:
yp05327 2023-07-26 09:41:33 +09:00 committed by GitHub
parent d36ddfe26c
commit 74ca4377ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View File

@ -519,6 +519,8 @@ var migrations = []Migration{
NewMigration("Add action_tasks_version table", v1_21.CreateActionTasksVersionTable),
// v268 -> v269
NewMigration("Update Action Ref", v1_21.UpdateActionsRefIndex),
// v269 -> v270
NewMigration("Drop deleted branch table", v1_21.DropDeletedBranchTable),
}
// GetCurrentDBVersion returns the current db version

View File

@ -89,5 +89,5 @@ func AddBranchTable(x *xorm.Engine) error {
}
}
return x.DropTables("deleted_branches")
return x.DropTables(new(DeletedBranch))
}

View File

@ -0,0 +1,12 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package v1_21 //nolint
import (
"xorm.io/xorm"
)
func DropDeletedBranchTable(x *xorm.Engine) error {
return x.DropTables("deleted_branch")
}