This commit is contained in:
36
pb_migrations/1765135365_updated_users.js
Normal file
36
pb_migrations/1765135365_updated_users.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId('_pb_users_auth_')
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
oauth2: {
|
||||
enabled: true
|
||||
},
|
||||
otp: {
|
||||
enabled: true
|
||||
},
|
||||
passwordAuth: {
|
||||
enabled: false
|
||||
}
|
||||
}, collection)
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId('_pb_users_auth_')
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
oauth2: {
|
||||
enabled: false
|
||||
},
|
||||
otp: {
|
||||
enabled: false
|
||||
},
|
||||
passwordAuth: {
|
||||
enabled: true
|
||||
}
|
||||
}, collection)
|
||||
|
||||
return app.save(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user