1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Add migration for pronouns

This commit is contained in:
hazycora 2024-02-23 16:33:02 -06:00
parent bbf906eccc
commit 204dd9e300
No known key found for this signature in database
GPG key ID: 215AF1F81F86940E
2 changed files with 18 additions and 0 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,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{})
}