summaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_12/v119.go
blob: 60bfe6a57da2bbed0e601d01f5b9a80edfc6f0d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2020 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_12 //nolint

import (
	"xorm.io/xorm"
)

func FixMigratedRepositoryServiceType(x *xorm.Engine) error {
	// structs.GithubService:
	// GithubService = 2
	_, err := x.Exec("UPDATE repository SET original_service_type = ? WHERE original_url LIKE 'https://github.com/%'", 2)
	return err
}