mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-21 15:40:31 +00:00
fe567d26c1
MySQL stores `action_schedule.content` as `BLOB`, limiting scheduled workflow definitions to 65,535 bytes. Oversized workflows fail schedule refresh and can also suppress default-branch push handling. Store scheduled workflow content as `LONGBLOB`, migrate existing MySQL columns, and cover the migration by persisting 65,536 bytes. Fixes https://github.com/go-gitea/gitea/issues/38613
30 lines
575 B
Go
30 lines
575 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v28
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.dev/modelmigration/base"
|
|
"gitea.dev/modules/setting"
|
|
|
|
"xorm.io/xorm/schemas"
|
|
)
|
|
|
|
func ExpandActionScheduleContent(ctx context.Context, x base.EngineMigration) error {
|
|
if !setting.Database.Type.IsMySQL() {
|
|
return nil
|
|
}
|
|
|
|
return base.ModifyColumn(ctx, x, "action_schedule", &schemas.Column{
|
|
Name: "content",
|
|
SQLType: schemas.SQLType{
|
|
Name: "LONGBLOB",
|
|
},
|
|
Length: 0,
|
|
Nullable: true,
|
|
DefaultIsEmpty: true,
|
|
})
|
|
}
|