1
0
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:
Gani Georgiev
2023-02-23 21:07:00 +02:00
parent e529fe7e2a
commit aa4e405f92
55 changed files with 495 additions and 330 deletions

View 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
})
}