gitea源码

v230.go 487B

123456789101112131415161718
  1. // Copyright 2022 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_18
  4. import (
  5. "xorm.io/xorm"
  6. )
  7. // AddConfidentialColumnToOAuth2ApplicationTable: add ConfidentialClient column, setting existing rows to true
  8. func AddConfidentialClientColumnToOAuth2ApplicationTable(x *xorm.Engine) error {
  9. type oauth2Application struct {
  10. ID int64
  11. ConfidentialClient bool `xorm:"NOT NULL DEFAULT TRUE"`
  12. }
  13. return x.Sync(new(oauth2Application))
  14. }