update to UserSSHKeypair per feedback

This commit is contained in:
techknowlogick
2025-08-08 12:20:39 -04:00
parent cee2ca0a7f
commit f97acdc60f
8 changed files with 65 additions and 60 deletions
+5
View File
@@ -24,6 +24,7 @@ import (
"code.gitea.io/gitea/models/migrations/v1_22"
"code.gitea.io/gitea/models/migrations/v1_23"
"code.gitea.io/gitea/models/migrations/v1_24"
"code.gitea.io/gitea/models/migrations/v1_25"
"code.gitea.io/gitea/models/migrations/v1_6"
"code.gitea.io/gitea/models/migrations/v1_7"
"code.gitea.io/gitea/models/migrations/v1_8"
@@ -382,6 +383,10 @@ func prepareMigrationTasks() []*migration {
newMigration(318, "Add anonymous_access_mode for repo_unit", v1_24.AddRepoUnitAnonymousAccessMode),
newMigration(319, "Add ExclusiveOrder to Label table", v1_24.AddExclusiveOrderColumnToLabelTable),
newMigration(320, "Migrate two_factor_policy to login_source table", v1_24.MigrateSkipTwoFactor),
// Gitea 1.24.0 ends at migration ID number 320 (database version 321)
newMigration(321, "Use LONGTEXT for some columns and fix review_state.updated_files column", v1_25.UseLongTextInSomeColumnsAndFixBugs),
newMigration(322, "Add Mirror SSH keypair table", v1_25.AddUserSSHKeypairTable),
}
return preparedMigrations
}
+3 -3
View File
@@ -9,8 +9,8 @@ import (
"xorm.io/xorm"
)
func AddMirrorSSHKeypairTable(x *xorm.Engine) error {
type MirrorSSHKeypair struct {
func AddUserSSHKeypairTable(x *xorm.Engine) error {
type UserSSHKeypair struct {
ID int64 `xorm:"pk autoincr"`
OwnerID int64 `xorm:"INDEX NOT NULL"`
PrivateKeyEncrypted string `xorm:"TEXT NOT NULL"`
@@ -20,5 +20,5 @@ func AddMirrorSSHKeypairTable(x *xorm.Engine) error {
UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
}
return x.Sync(new(MirrorSSHKeypair))
return x.Sync(new(UserSSHKeypair))
}