112 lines
2.4 KiB
JavaScript
112 lines
2.4 KiB
JavaScript
|
/// <reference path="../pb_data/types.d.ts" />
|
||
|
migrate((db) => {
|
||
|
const collection = new Collection({
|
||
|
"id": "zfbbb4gbdk9dh6k",
|
||
|
"created": "2023-11-12 10:53:26.506Z",
|
||
|
"updated": "2023-11-12 10:53:26.506Z",
|
||
|
"name": "invites",
|
||
|
"type": "base",
|
||
|
"system": false,
|
||
|
"schema": [
|
||
|
{
|
||
|
"system": false,
|
||
|
"id": "oexf4zse",
|
||
|
"name": "name",
|
||
|
"type": "text",
|
||
|
"required": false,
|
||
|
"presentable": false,
|
||
|
"unique": false,
|
||
|
"options": {
|
||
|
"min": null,
|
||
|
"max": null,
|
||
|
"pattern": ""
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"system": false,
|
||
|
"id": "cdyuuznb",
|
||
|
"name": "noble_name",
|
||
|
"type": "text",
|
||
|
"required": false,
|
||
|
"presentable": false,
|
||
|
"unique": false,
|
||
|
"options": {
|
||
|
"min": null,
|
||
|
"max": null,
|
||
|
"pattern": ""
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"system": false,
|
||
|
"id": "5m2msvat",
|
||
|
"name": "hair_type",
|
||
|
"type": "text",
|
||
|
"required": false,
|
||
|
"presentable": false,
|
||
|
"unique": false,
|
||
|
"options": {
|
||
|
"min": null,
|
||
|
"max": null,
|
||
|
"pattern": ""
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"system": false,
|
||
|
"id": "runxpwtr",
|
||
|
"name": "hair_color",
|
||
|
"type": "text",
|
||
|
"required": false,
|
||
|
"presentable": false,
|
||
|
"unique": false,
|
||
|
"options": {
|
||
|
"min": null,
|
||
|
"max": null,
|
||
|
"pattern": ""
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"system": false,
|
||
|
"id": "p1fnj4yw",
|
||
|
"name": "hair_length",
|
||
|
"type": "text",
|
||
|
"required": false,
|
||
|
"presentable": false,
|
||
|
"unique": false,
|
||
|
"options": {
|
||
|
"min": null,
|
||
|
"max": null,
|
||
|
"pattern": ""
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"system": false,
|
||
|
"id": "rdxgmjz0",
|
||
|
"name": "portrait_url",
|
||
|
"type": "text",
|
||
|
"required": false,
|
||
|
"presentable": false,
|
||
|
"unique": false,
|
||
|
"options": {
|
||
|
"min": null,
|
||
|
"max": null,
|
||
|
"pattern": ""
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"indexes": [],
|
||
|
"listRule": null,
|
||
|
"viewRule": null,
|
||
|
"createRule": null,
|
||
|
"updateRule": null,
|
||
|
"deleteRule": null,
|
||
|
"options": {}
|
||
|
});
|
||
|
|
||
|
return Dao(db).saveCollection(collection);
|
||
|
}, (db) => {
|
||
|
const dao = new Dao(db);
|
||
|
const collection = dao.findCollectionByNameOrId("zfbbb4gbdk9dh6k");
|
||
|
|
||
|
return dao.deleteCollection(collection);
|
||
|
})
|