mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-25 21:44:20 -04:00
There are too many files in `models/migrations` folder so that I split them into sub folders.
24 lines
495 B
Go
24 lines
495 B
Go
// Copyright 2021 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package v1_16 //nolint
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddTableAppState(x *xorm.Engine) error {
|
|
type AppState struct {
|
|
ID string `xorm:"pk varchar(200)"`
|
|
Revision int64
|
|
Content string `xorm:"LONGTEXT"`
|
|
}
|
|
if err := x.Sync2(new(AppState)); err != nil {
|
|
return fmt.Errorf("Sync2: %w", err)
|
|
}
|
|
return nil
|
|
}
|