diff options
author | yp05327 <576951401@qq.com> | 2023-07-26 09:41:33 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 08:41:33 +0800 |
commit | 74ca4377ff93215f7eb894561ce592c84c564780 (patch) | |
tree | d21bbe547015dafd2771442c83878dc3d7af1447 /models/migrations | |
parent | d36ddfe26c940b7820e866b87d18b425d206389f (diff) | |
download | gitea-74ca4377ff93215f7eb894561ce592c84c564780.tar.gz gitea-74ca4377ff93215f7eb894561ce592c84c564780.zip |
Drop the correct deleted branch table (#26028)
There's a typo in #22743
The correct table name is `deleted_branch` not `deleted_branches`
Diffstat (limited to 'models/migrations')
-rw-r--r-- | models/migrations/migrations.go | 2 | ||||
-rw-r--r-- | models/migrations/v1_21/v264.go | 2 | ||||
-rw-r--r-- | models/migrations/v1_21/v269.go | 12 |
3 files changed, 15 insertions, 1 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index fc11d54071..2b090a9132 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 60b7a7acf7..e81a17ad6d 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 0000000000..475ec02380 --- /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") +} |