diff --git a/models/forgejo_migrations/migrate.go b/models/forgejo_migrations/migrate.go index 965b748ac..7c295247c 100644 --- a/models/forgejo_migrations/migrate.go +++ b/models/forgejo_migrations/migrate.go @@ -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. diff --git a/models/forgejo_migrations/v1_22/v10.go b/models/forgejo_migrations/v1_22/v10.go new file mode 100644 index 000000000..bf1639eee --- /dev/null +++ b/models/forgejo_migrations/v1_22/v10.go @@ -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{}) +}