Add existing PB migrations
This commit is contained in:
31
pb/pb_migrations/1731214250_updated_photos.js
Normal file
31
pb/pb_migrations/1731214250_updated_photos.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("my9ej2vdwzwoqov")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "x9ytobkp",
|
||||
"name": "alt",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("my9ej2vdwzwoqov")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("x9ytobkp")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user