0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-22 21:45:24 +02:00

fix: Shorten index name to fix MySQL identifier length limit

This commit is contained in:
Pascal Zimmermann 2026-03-31 23:36:52 +02:00
parent 5096d6c942
commit c06bfe95e5
4 changed files with 19 additions and 17 deletions

View File

@ -21,13 +21,15 @@ import (
// ActionRunJob represents a job of a run // ActionRunJob represents a job of a run
type ActionRunJob struct { type ActionRunJob struct {
ID int64 ID int64
RunID int64 `xorm:"index index(idx_action_run_job_run_id_job_id)"` RunID int64 `xorm:"index index(idx_run_id_job_id)"`
Run *ActionRun `xorm:"-"` Run *ActionRun `xorm:"-"`
RepoID int64 `xorm:"index(repo_concurrency)"` RepoID int64 `xorm:"index(repo_concurrency)"`
Repo *repo_model.Repository `xorm:"-"` Repo *repo_model.Repository `xorm:"-"`
OwnerID int64 `xorm:"index"` OwnerID int64 `xorm:"index"`
CommitSHA string `xorm:"index"` CommitSHA string `xorm:"index"`
IsForkPullRequest bool IsForkPullRequest bool
// ...existing code...
Name string `xorm:"VARCHAR(255)"` Name string `xorm:"VARCHAR(255)"`
Attempt int64 Attempt int64
@ -35,7 +37,7 @@ type ActionRunJob struct {
// it should contain exactly one job with global workflow fields for this model // it should contain exactly one job with global workflow fields for this model
WorkflowPayload []byte WorkflowPayload []byte
JobID string `xorm:"VARCHAR(255) index(idx_action_run_job_run_id_job_id)"` // job id in workflow, not job's id JobID string `xorm:"VARCHAR(255) index(idx_run_id_job_id)"` // job id in workflow, not job's id
Needs []string `xorm:"JSON TEXT"` Needs []string `xorm:"JSON TEXT"`
RunsOn []string `xorm:"JSON TEXT"` RunsOn []string `xorm:"JSON TEXT"`
TaskID int64 // the latest task of the job TaskID int64 // the latest task of the job