mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-27 03:31:44 +00:00
feat: a new status for canceled workflow run
This commit is contained in:
65
migrations/1737479489_updated_workflow.go
Normal file
65
migrations/1737479489_updated_workflow.go
Normal file
@@ -0,0 +1,65 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection, err := app.FindCollectionByNameOrId("tovyif5ax6j62ur")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// update field
|
||||
if err := collection.Fields.AddMarshaledJSONAt(10, []byte(`{
|
||||
"hidden": false,
|
||||
"id": "zivdxh23",
|
||||
"maxSelect": 1,
|
||||
"name": "lastRunStatus",
|
||||
"presentable": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "select",
|
||||
"values": [
|
||||
"pending",
|
||||
"running",
|
||||
"succeeded",
|
||||
"failed",
|
||||
"canceled"
|
||||
]
|
||||
}`)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return app.Save(collection)
|
||||
}, func(app core.App) error {
|
||||
collection, err := app.FindCollectionByNameOrId("tovyif5ax6j62ur")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// update field
|
||||
if err := collection.Fields.AddMarshaledJSONAt(10, []byte(`{
|
||||
"hidden": false,
|
||||
"id": "zivdxh23",
|
||||
"maxSelect": 1,
|
||||
"name": "lastRunStatus",
|
||||
"presentable": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "select",
|
||||
"values": [
|
||||
"pending",
|
||||
"running",
|
||||
"succeeded",
|
||||
"failed"
|
||||
]
|
||||
}`)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return app.Save(collection)
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user