models/forgejo_migrations: Gitea tables migration ID

Sync() will act on the given struct and the ID field should be exactly
as it is in the Gitea migration when a Gitea table is modified.
This commit is contained in:
Earl Warren 2024-03-27 09:27:32 +01:00
parent d5a3f14063
commit d6eab2b586
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ import (
func AddWikiBranchToRepository(x *xorm.Engine) error {
type Repository struct {
ID int64
ID int64 `xorm:"pk autoincr"`
WikiBranch string
}

View file

@ -9,8 +9,8 @@ import (
func AddUserRepoUnitHintsSetting(x *xorm.Engine) error {
type User struct {
ID int64
EnableRepoUnitHints bool `xorm:"NOT NULL DEFAULT true"`
ID int64 `xorm:"pk autoincr"`
EnableRepoUnitHints bool `xorm:"NOT NULL DEFAULT true"`
}
return x.Sync(&User{})