gitea源码

v316.go 481B

12345678910111213141516171819202122232425
  1. // Copyright 2025 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_24
  4. import (
  5. "xorm.io/xorm"
  6. )
  7. func AddDescriptionForSecretsAndVariables(x *xorm.Engine) error {
  8. type Secret struct {
  9. Description string `xorm:"TEXT"`
  10. }
  11. type ActionVariable struct {
  12. Description string `xorm:"TEXT"`
  13. }
  14. _, err := x.SyncWithOptions(xorm.SyncOptions{
  15. IgnoreConstrains: true,
  16. IgnoreIndices: true,
  17. }, new(Secret), new(ActionVariable))
  18. return err
  19. }