Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Oct 21, 2021
1 parent da06117 commit c9689c1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ var migrations = []Migration{
NewMigration("No-op (remote version is using AppState now)", addRemoteVersionTableNoop),
// v200 -> v201
NewMigration("Add table app_state", addTableAppState),
// v201 -> v202
NewMigration("Drop table remote_version (if exists)", dropTableRemoteVersion),
}

// GetCurrentDBVersion returns the current db version
Expand Down
15 changes: 15 additions & 0 deletions models/migrations/v201.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

package migrations

import (
"xorm.io/xorm"
)

func dropTableRemoteVersion(x *xorm.Engine) error {
// drop the orphaned table introduced in `v199`, now the update checker also uses AppState, do not need this table
_ = x.DropTables("remote_version")
return nil
}

0 comments on commit c9689c1

Please sign in to comment.