This repository has been archived on 2025-10-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
garands-world-game-archived/pocketbase/pb_migrations/1728903415_updated_maps.js

45 lines
950 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("aqfw901eiii92dx")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "rxxi75bg",
"name": "name",
"type": "text",
"required": true,
"presentable": true,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("aqfw901eiii92dx")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "rxxi75bg",
"name": "name",
"type": "text",
"required": true,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
return dao.saveCollection(collection)
})