summaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_16/v200.go
blob: c08c20e51de4488a6b35ace18e1d702defae10ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2021 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

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.Sync(new(AppState)); err != nil {
		return fmt.Errorf("Sync: %w", err)
	}
	return nil
}