gitea源码

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