gitea源码

1234567891011121314151617181920212223
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_16
  4. import (
  5. "fmt"
  6. "xorm.io/xorm"
  7. )
  8. func AddTableAppState(x *xorm.Engine) error {
  9. type AppState struct {
  10. ID string `xorm:"pk varchar(200)"`
  11. Revision int64
  12. Content string `xorm:"LONGTEXT"`
  13. }
  14. if err := x.Sync(new(AppState)); err != nil {
  15. return fmt.Errorf("Sync: %w", err)
  16. }
  17. return nil
  18. }