2022-10-17 08:29:26 +09:00
|
|
|
// Copyright 2022 The Gitea Authors. All rights reserved.
|
2022-11-28 03:20:29 +09:00
|
|
|
// SPDX-License-Identifier: MIT
|
2022-10-17 08:29:26 +09:00
|
|
|
|
2022-12-08 17:21:37 +09:00
|
|
|
package v1_18 //nolint
|
2022-10-17 08:29:26 +09:00
|
|
|
|
|
|
|
import (
|
|
|
|
"code.gitea.io/gitea/modules/timeutil"
|
|
|
|
|
|
|
|
"xorm.io/xorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
type SystemSetting struct {
|
|
|
|
ID int64 `xorm:"pk autoincr"`
|
|
|
|
SettingKey string `xorm:"varchar(255) unique"` // ensure key is always lowercase
|
|
|
|
SettingValue string `xorm:"text"`
|
|
|
|
Version int `xorm:"version"` // prevent to override
|
|
|
|
Created timeutil.TimeStamp `xorm:"created"`
|
|
|
|
Updated timeutil.TimeStamp `xorm:"updated"`
|
|
|
|
}
|
|
|
|
|
2022-11-02 17:54:36 +09:00
|
|
|
func CreateSystemSettingsTable(x *xorm.Engine) error {
|
2023-10-05 10:08:19 +09:00
|
|
|
return x.Sync(new(SystemSetting))
|
2022-10-17 08:29:26 +09:00
|
|
|
}
|