replaced authentik with generic oidc provider
This commit is contained in:
@@ -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