Skip to content

Commit c9689c1

Browse files
committed
fix
1 parent da06117 commit c9689c1

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

models/migrations/migrations.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,8 @@ var migrations = []Migration{
354354
NewMigration("No-op (remote version is using AppState now)", addRemoteVersionTableNoop),
355355
// v200 -> v201
356356
NewMigration("Add table app_state", addTableAppState),
357+
// v201 -> v202
358+
NewMigration("Drop table remote_version (if exists)", dropTableRemoteVersion),
357359
}
358360

359361
// GetCurrentDBVersion returns the current db version

models/migrations/v201.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2021 The Gitea Authors. All rights reserved.
2+
// Use of this source code is governed by a MIT-style
3+
// license that can be found in the LICENSE file.
4+
5+
package migrations
6+
7+
import (
8+
"xorm.io/xorm"
9+
)
10+
11+
func dropTableRemoteVersion(x *xorm.Engine) error {
12+
// drop the orphaned table introduced in `v199`, now the update checker also uses AppState, do not need this table
13+
_ = x.DropTables("remote_version")
14+
return nil
15+
}

0 commit comments

Comments
 (0)