mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 03:52:36 +02:00
switch to use user_settings table per feedback
This commit is contained in:
1 parent
2f3f2d1afd
commit
3ed601dcf4
5 files changed
+74
-51
No files matched your search
@@ -386,7 +386,6 @@ func prepareMigrationTasks() []*migration {
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
// Copyright 2025 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v1_25
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
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"`
|
||||
PublicKey string `xorm:"TEXT NOT NULL"`
|
||||
Fingerprint string `xorm:"VARCHAR(255) UNIQUE NOT NULL"`
|
||||
CreatedUnix timeutil.TimeStamp `xorm:"created"`
|
||||
UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
|
||||
}
|
||||
|
||||
return x.Sync(new(UserSSHKeypair))
|
||||
}
|
||||
Reference in new issue
Block a user