Skip to content

Commit 74ca437

Browse files
authored
Drop the correct deleted branch table (#26028)
There's a typo in #22743 The correct table name is `deleted_branch` not `deleted_branches`
1 parent d36ddfe commit 74ca437

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

models/migrations/migrations.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@ var migrations = []Migration{
519519
NewMigration("Add action_tasks_version table", v1_21.CreateActionTasksVersionTable),
520520
// v268 -> v269
521521
NewMigration("Update Action Ref", v1_21.UpdateActionsRefIndex),
522+
// v269 -> v270
523+
NewMigration("Drop deleted branch table", v1_21.DropDeletedBranchTable),
522524
}
523525

524526
// GetCurrentDBVersion returns the current db version

models/migrations/v1_21/v264.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ func AddBranchTable(x *xorm.Engine) error {
8989
}
9090
}
9191

92-
return x.DropTables("deleted_branches")
92+
return x.DropTables(new(DeletedBranch))
9393
}

models/migrations/v1_21/v269.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2023 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
4+
package v1_21 //nolint
5+
6+
import (
7+
"xorm.io/xorm"
8+
)
9+
10+
func DropDeletedBranchTable(x *xorm.Engine) error {
11+
return x.DropTables("deleted_branch")
12+
}

0 commit comments

Comments
 (0)