Initial commit
This commit is contained in:
29
pocketbase/pb_migrations/1_users_language.js
Normal file
29
pocketbase/pb_migrations/1_users_language.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId('_pb_users_auth_')
|
||||
|
||||
// add field
|
||||
collection.fields.addAt(8, new Field({
|
||||
hidden: false,
|
||||
id: 'select3571151285',
|
||||
maxSelect: 1,
|
||||
name: 'language',
|
||||
presentable: false,
|
||||
required: false,
|
||||
system: false,
|
||||
type: 'select',
|
||||
values: [
|
||||
'de',
|
||||
'en'
|
||||
]
|
||||
}))
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId('_pb_users_auth_')
|
||||
|
||||
// remove field
|
||||
collection.fields.removeById('select3571151285')
|
||||
|
||||
return app.save(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user