This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"gitea.dev/models/db"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
@@ -16,7 +18,7 @@ func (pullAutoMerge) TableName() string {
|
||||
return "pull_auto_merge"
|
||||
}
|
||||
|
||||
func AddDeleteBranchAfterMergeForAutoMerge(x *xorm.Engine) error {
|
||||
func AddDeleteBranchAfterMergeForAutoMerge(x db.EngineMigration) error {
|
||||
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
||||
IgnoreConstrains: true,
|
||||
IgnoreIndices: true,
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/models/migrations/base"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"gitea.dev/models/db"
|
||||
"gitea.dev/models/migrations/base"
|
||||
)
|
||||
|
||||
func MovePinOrderToTableIssuePin(x *xorm.Engine) error {
|
||||
func MovePinOrderToTableIssuePin(x db.EngineMigration) error {
|
||||
type IssuePin struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
RepoID int64 `xorm:"UNIQUE(s) NOT NULL"`
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
import "gitea.dev/models/db"
|
||||
|
||||
func UpdateOwnerIDOfRepoLevelActionsTables(x *xorm.Engine) error {
|
||||
func UpdateOwnerIDOfRepoLevelActionsTables(x db.EngineMigration) error {
|
||||
if _, err := x.Exec("UPDATE `action_runner` SET `owner_id` = 0 WHERE `repo_id` > 0 AND `owner_id` > 0"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"gitea.dev/models/db"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func AddEphemeralToActionRunner(x *xorm.Engine) error {
|
||||
func AddEphemeralToActionRunner(x db.EngineMigration) error {
|
||||
type ActionRunner struct {
|
||||
Ephemeral bool `xorm:"ephemeral NOT NULL DEFAULT false"`
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"gitea.dev/models/db"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func AddDescriptionForSecretsAndVariables(x *xorm.Engine) error {
|
||||
func AddDescriptionForSecretsAndVariables(x db.EngineMigration) error {
|
||||
type Secret struct {
|
||||
Description string `xorm:"TEXT"`
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
"gitea.dev/models/db"
|
||||
"gitea.dev/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
@@ -51,6 +51,6 @@ func (a *improveActionTableIndicesAction) TableIndices() []*schemas.Index {
|
||||
return indices
|
||||
}
|
||||
|
||||
func AddNewIndexForUserDashboard(x *xorm.Engine) error {
|
||||
func AddNewIndexForUserDashboard(x db.EngineMigration) error {
|
||||
return x.Sync(new(improveActionTableIndicesAction))
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/models/perm"
|
||||
"gitea.dev/models/db"
|
||||
"gitea.dev/models/perm"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func AddRepoUnitAnonymousAccessMode(x *xorm.Engine) error {
|
||||
func AddRepoUnitAnonymousAccessMode(x db.EngineMigration) error {
|
||||
type RepoUnit struct { //revive:disable-line:exported
|
||||
AnonymousAccessMode perm.AccessMode `xorm:"NOT NULL DEFAULT 0"`
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"gitea.dev/models/db"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func AddExclusiveOrderColumnToLabelTable(x *xorm.Engine) error {
|
||||
func AddExclusiveOrderColumnToLabelTable(x db.EngineMigration) error {
|
||||
type Label struct {
|
||||
ExclusiveOrder int `xorm:"DEFAULT 0"`
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
package v1_24
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/modules/json"
|
||||
"gitea.dev/models/db"
|
||||
"gitea.dev/modules/json"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func MigrateSkipTwoFactor(x *xorm.Engine) error {
|
||||
func MigrateSkipTwoFactor(x db.EngineMigration) error {
|
||||
type LoginSource struct {
|
||||
TwoFactorPolicy string `xorm:"two_factor_policy NOT NULL DEFAULT ''"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user