Files
hudozka/pb/pb_migrations/1775414274_updated_files.js
T
2026-04-12 19:13:24 +03:00

43 lines
937 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "file2359244304",
"maxSelect": 1,
"maxSize": 104857600,
"mimeTypes": [],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [],
"type": "file"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "file2359244304",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [],
"type": "file"
}))
return app.save(collection)
})