1
Fork 0

Merge pull request 'Add optional pronoun field in user settings' (#1518) from hazy/forgejo:feat/pronoun-field into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1518
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
This commit is contained in:
Gusted 2024-04-06 12:23:54 +00:00
commit d8eebe7698
21 changed files with 331 additions and 1 deletions

View file

@ -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.

View file

@ -0,0 +1,17 @@
// 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 {
ID int64 `xorm:"pk autoincr"`
Pronouns string
}
return x.Sync(&User{})
}

View file

@ -95,6 +95,7 @@ type User struct {
Type UserType
Location string
Website string
Pronouns string
Rands string `xorm:"VARCHAR(32)"`
Salt string `xorm:"VARCHAR(32)"`
Language string `xorm:"VARCHAR(5)"`