You've already forked pocketbase
mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-11-06 09:29:19 +02:00
replaced authentik with generic oidc provider
This commit is contained in:
26
migrations/1677152688_rename_authentik_to_oidc.go
Normal file
26
migrations/1677152688_rename_authentik_to_oidc.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
)
|
||||
|
||||
// This migration replaces the "authentikAuth" setting with "oidc".
|
||||
func init() {
|
||||
AppMigrations.Register(func(db dbx.Builder) error {
|
||||
_, err := db.NewQuery(`
|
||||
UPDATE {{_params}}
|
||||
SET [[value]] = replace([[value]], '"authentikAuth":', '"oidcAuth":')
|
||||
WHERE [[key]] = 'settings'
|
||||
`).Execute()
|
||||
|
||||
return err
|
||||
}, func(db dbx.Builder) error {
|
||||
_, err := db.NewQuery(`
|
||||
UPDATE {{_params}}
|
||||
SET [[value]] = replace([[value]], '"oidcAuth":', '"authentikAuth":')
|
||||
WHERE [[key]] = 'settings'
|
||||
`).Execute()
|
||||
|
||||
return err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user