Add existing PB migrations
This commit is contained in:
29
pb/pb_migrations/1731115342_updated_software.js
Normal file
29
pb/pb_migrations/1731115342_updated_software.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("rl3ddso9")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "rl3ddso9",
|
||||
"name": "privacy_policy",
|
||||
"type": "editor",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"convertUrls": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user