summaryrefslogtreecommitdiffstats
path: root/models/migrations/v92.go
blob: 7ad5118176e4031a699efeb9fd147a8f25377e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2019 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/builder"
	"xorm.io/xorm"
)

func removeLingeringIndexStatus(x *xorm.Engine) error {

	_, err := x.Exec(builder.Delete(builder.NotIn("`repo_id`", builder.Select("`id`").From("`repository`"))).From("`repo_indexer_status`"))
	return err
}