You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

v289.go 489B

123456789101112131415161718
  1. // Copyright 2024 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_22 //nolint
  4. import "xorm.io/xorm"
  5. func AddDefaultWikiBranch(x *xorm.Engine) error {
  6. type Repository struct {
  7. ID int64
  8. DefaultWikiBranch string
  9. }
  10. if err := x.Sync(&Repository{}); err != nil {
  11. return err
  12. }
  13. _, err := x.Exec("UPDATE `repository` SET default_wiki_branch = 'master' WHERE (default_wiki_branch IS NULL) OR (default_wiki_branch = '')")
  14. return err
  15. }