Initial commit
This commit is contained in:
29
pocketbase/pb_migrations/1742456161_updated_history.js
Normal file
29
pocketbase/pb_migrations/1742456161_updated_history.js
Normal file
@ -0,0 +1,29 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_3068727201")
|
||||
|
||||
// add field
|
||||
collection.fields.addAt(6, new Field({
|
||||
"hidden": false,
|
||||
"id": "file2124799118",
|
||||
"maxSelect": 1,
|
||||
"maxSize": 0,
|
||||
"mimeTypes": [],
|
||||
"name": "image_file",
|
||||
"presentable": false,
|
||||
"protected": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"thumbs": [],
|
||||
"type": "file"
|
||||
}))
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_3068727201")
|
||||
|
||||
// remove field
|
||||
collection.fields.removeById("file2124799118")
|
||||
|
||||
return app.save(collection)
|
||||
})
|
Reference in New Issue
Block a user