Add pocketbase migrations
This commit is contained in:
parent
c75003f5f0
commit
0d330c4f60
13 changed files with 547 additions and 0 deletions
48
pb_migrations/1702060926_updated_tasks.js
Normal file
48
pb_migrations/1702060926_updated_tasks.js
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("pf13z4hs1iubw41")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("hrzb5spy")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "bkjgp8xt",
|
||||
"name": "description",
|
||||
"type": "editor",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"convertUrls": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("pf13z4hs1iubw41")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "hrzb5spy",
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}))
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("bkjgp8xt")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue