This commit is contained in:
Fu Diwei
2025-11-05 16:24:15 +08:00
parent 0cbbd9fba2
commit 35718e028b
2 changed files with 39 additions and 1 deletions
+38
View File
@@ -0,0 +1,38 @@
package migrations
import (
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
tracer := NewTracer("v0.4.4")
tracer.Printf("go ...")
// update collection `access`
// - fix #1027
{
if _, err := app.DB().NewQuery("UPDATE access SET provider = 'hostingde' WHERE provider = 'hostingDE'").Execute(); err != nil {
return err
}
}
// update collection `workflow`
// - fix #1027
{
if _, err := app.DB().NewQuery("UPDATE workflow SET graphDraft = REPLACE(graphDraft, '\"hostingDE\"', '\"hostingde\"')").Execute(); err != nil {
return err
}
if _, err := app.DB().NewQuery("UPDATE workflow SET graphContent = REPLACE(graphContent, '\"hostingDE\"', '\"hostingde\"')").Execute(); err != nil {
return err
}
}
tracer.Printf("done")
return nil
}, func(app core.App) error {
return nil
})
}
+1 -1
View File
@@ -57,7 +57,7 @@ export const ACCESS_PROVIDERS = Object.freeze({
GOEDGE: "goedge",
GOOGLETRUSTSERVICES: "googletrustservices",
HETZNER: "hetzner",
HOSTINGDE: "hostingDE",
HOSTINGDE: "hostingde",
HOSTINGER: "hostinger",
HUAWEICLOUD: "huaweicloud",
IONOS: "ionos",