diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index fc11d5407..2b090a913 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -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 diff --git a/models/migrations/v1_21/v264.go b/models/migrations/v1_21/v264.go index 60b7a7acf..e81a17ad6 100644 --- a/models/migrations/v1_21/v264.go +++ b/models/migrations/v1_21/v264.go @@ -89,5 +89,5 @@ func AddBranchTable(x *xorm.Engine) error { } } - return x.DropTables("deleted_branches") + return x.DropTables(new(DeletedBranch)) } diff --git a/models/migrations/v1_21/v269.go b/models/migrations/v1_21/v269.go new file mode 100644 index 000000000..475ec0238 --- /dev/null +++ b/models/migrations/v1_21/v269.go @@ -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") +}