code.gitea.io/gitea@v1.21.7/models/migrations/v1_12/v119.go (about)

     1  // Copyright 2020 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package v1_12 //nolint
     5  
     6  import (
     7  	"xorm.io/xorm"
     8  )
     9  
    10  func FixMigratedRepositoryServiceType(x *xorm.Engine) error {
    11  	// structs.GithubService:
    12  	// GithubService = 2
    13  	_, err := x.Exec("UPDATE repository SET original_service_type = ? WHERE original_url LIKE 'https://github.com/%'", 2)
    14  	return err
    15  }