43 lines
958 B
JavaScript
43 lines
958 B
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_1125843985")
|
|
|
|
// update field
|
|
collection.fields.addAt(1, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text2560465762",
|
|
"max": 0,
|
|
"min": 1,
|
|
"name": "slug",
|
|
"pattern": "^[a-z0-9-/]+$",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": true,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
return app.save(collection)
|
|
}, (app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_1125843985")
|
|
|
|
// update field
|
|
collection.fields.addAt(1, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text2560465762",
|
|
"max": 0,
|
|
"min": 1,
|
|
"name": "slug",
|
|
"pattern": "^[a-z0-9-]+$",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": true,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
return app.save(collection)
|
|
})
|