fix: xorm:version default is inconsistent

The following message is displayed when upgrading to Forgejo:

[W] Table system_setting Column version db default is , struct default is 1

The same message also shows when upgrading from Gitea 1.21 to Gitea 1.22.

It is fine for the version field to default to zero or NULL instead of one.
This commit is contained in:
Earl Warren 2024-12-22 11:39:06 +01:00
parent 274bc480b4
commit 2dc167cbb9
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -21,7 +21,7 @@ type Setting struct {
ID int64 `xorm:"pk autoincr"`
SettingKey string `xorm:"varchar(255) unique"` // key should be lowercase
SettingValue string `xorm:"text"`
Version int `xorm:"version"`
Version int
Created timeutil.TimeStamp `xorm:"created"`
Updated timeutil.TimeStamp `xorm:"updated"`
}