aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-11-21 17:02:51 +0900
committerGitHub <noreply@github.com>2023-11-21 08:02:51 +0000
commit976a9926d721b8594f4d73bacdb6b603906c1e56 (patch)
tree0e8459297d830142d0c86127c72a9f8840a671cc
parent0c0d17f17eba7c0fd2a0398be4b671ac2247a864 (diff)
downloadgitea-976a9926d721b8594f4d73bacdb6b603906c1e56.tar.gz
gitea-976a9926d721b8594f4d73bacdb6b603906c1e56.zip
Fix no ActionTaskOutput table waring (#28149)
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.
-rw-r--r--models/actions/task_output.go4
1 files changed, 4 insertions, 0 deletions
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