mirror of
https://github.com/go-gitea/gitea
synced 2025-07-24 19:28:38 +00:00
Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
@@ -469,6 +469,8 @@ var migrations = []Migration{
|
||||
NewMigration("Add NeedApproval to actions tables", v1_20.AddNeedApprovalToActionRun),
|
||||
// v245 -> v246
|
||||
NewMigration("Rename Webhook org_id to owner_id", v1_20.RenameWebhookOrgToOwner),
|
||||
// v246 -> v247
|
||||
NewMigration("Add missed column owner_id for project table", v1_20.AddNewColumnForProject),
|
||||
}
|
||||
|
||||
// GetCurrentDBVersion returns the current db version
|
||||
|
16
models/migrations/v1_20/v246.go
Normal file
16
models/migrations/v1_20/v246.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright 2023 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v1_20 //nolint
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func AddNewColumnForProject(x *xorm.Engine) error {
|
||||
type Project struct {
|
||||
OwnerID int64 `xorm:"INDEX"`
|
||||
}
|
||||
|
||||
return x.Sync(new(Project))
|
||||
}
|
Reference in New Issue
Block a user