From 40ded966ceb457bf82d29564c6906614afda41df Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 21 Nov 2023 22:23:57 +0800 Subject: [PATCH] Fix no ActionTaskOutput table waring (#28149) (#28152) Backport #28149 by @yp05327 Reproduce: - Create a new Gitea instance - Register a runner - Create a repo and add a workflow - Check the log, you will see warnings: ![image](https://github.com/go-gitea/gitea/assets/18380374/5f1278e0-114b-48bc-8113-8ba1404d9975) It comes from: ![image](https://github.com/go-gitea/gitea/assets/18380374/c2807831-e137-4229-9536-87f6114c8a5b) The reason is that we forgot registering `ActionTaskOutput` model. So `action_table_output` table will be missing in your db. Co-authored-by: yp05327 <576951401@qq.com> (cherry picked from commit efcbaf8fa80def9afd61c0d16fa7fd94bc511eb5) --- models/actions/task_output.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/actions/task_output.go b/models/actions/task_output.go index 5291a783d6..eab5b93118 100644 --- a/models/actions/task_output.go +++ b/models/actions/task_output.go @@ -20,6 +20,10 @@ type ActionTaskOutput struct { OutputValue string `xorm:"MEDIUMTEXT"` } +func init() { + db.RegisterModel(new(ActionTaskOutput)) +} + // FindTaskOutputByTaskID returns the outputs of the task. func FindTaskOutputByTaskID(ctx context.Context, taskID int64) ([]*ActionTaskOutput, error) { var outputs []*ActionTaskOutput