Files
gitlab-instance-0a899031_no…/pb_migrations/1760628872_updated_file.js
eric be7f773e79 s
2025-10-16 15:58:07 +00:00

35 lines
765 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2878493088")
// add field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "file2093472300",
"maxSelect": 99,
"maxSize": 0,
"mimeTypes": [
"video/mp4",
"video/x-ms-wmv",
"video/quicktime",
"video/3gpp"
],
"name": "video",
"presentable": false,
"protected": false,
"required": false,
"system": false,
"thumbs": [],
"type": "file"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2878493088")
// remove field
collection.fields.removeById("file2093472300")
return app.save(collection)
})