mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 19:11:58 +01:00
Add migration for pronouns
This commit is contained in:
parent
bbf906eccc
commit
204dd9e300
2 changed files with 18 additions and 0 deletions
|
@ -56,6 +56,8 @@ var migrations = []*Migration{
|
|||
NewMigration("Modify the `release`.`note` content to remove SSH signatures", forgejo_v1_22.RemoveSSHSignaturesFromReleaseNotes),
|
||||
// v8 -> v9
|
||||
NewMigration("Add the `apply_to_admins` column to the `protected_branch` table", forgejo_v1_22.AddApplyToAdminsSetting),
|
||||
// v9 -> v10
|
||||
NewMigration("Add pronouns to user", forgejo_v1_22.AddPronounsToUser),
|
||||
}
|
||||
|
||||
// GetCurrentDBVersion returns the current Forgejo database version.
|
||||
|
|
16
models/forgejo_migrations/v1_22/v10.go
Normal file
16
models/forgejo_migrations/v1_22/v10.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v1_22 //nolint
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func AddPronounsToUser(x *xorm.Engine) error {
|
||||
type User struct {
|
||||
Pronouns string
|
||||
}
|
||||
|
||||
return x.Sync(&User{})
|
||||
}
|
Loading…
Reference in a new issue