2022-10-17 04:59:26 +05:30
|
|
|
// Copyright 2022 The Gitea Authors. All rights reserved.
|
2022-11-27 23:50:29 +05:30
|
|
|
// SPDX-License-Identifier: MIT
|
2022-10-17 04:59:26 +05:30
|
|
|
|
2022-12-08 13:51:37 +05:30
|
|
|
package v1_18 //nolint
|
2022-10-17 04:59:26 +05:30
|
|
|
|
|
|
|
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 14:24:36 +05:30
|
|
|
func CreateSystemSettingsTable(x *xorm.Engine) error {
|
2023-10-05 06:38:19 +05:30
|
|
|
return x.Sync(new(SystemSetting))
|
2022-10-17 04:59:26 +05:30
|
|
|
}
|