From 35718e028b53222310417c38cffcd45b3983c716 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Wed, 5 Nov 2025 16:24:15 +0800 Subject: [PATCH] fix: #1027 --- migrations/1762329600_m0.4.4.go | 38 +++++++++++++++++++++++++++++++++ ui/src/domain/provider.ts | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 migrations/1762329600_m0.4.4.go diff --git a/migrations/1762329600_m0.4.4.go b/migrations/1762329600_m0.4.4.go new file mode 100644 index 000000000..c4ded9c8b --- /dev/null +++ b/migrations/1762329600_m0.4.4.go @@ -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 + }) +} diff --git a/ui/src/domain/provider.ts b/ui/src/domain/provider.ts index 32e18e3a2..5ddcaf579 100644 --- a/ui/src/domain/provider.ts +++ b/ui/src/domain/provider.ts @@ -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",