minichat/pb_migrations/1730468480_created_groups.js
2024-11-01 15:11:56 +01:00

41 lines
964 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const collection = new Collection({
"id": "b3bw2apayoyh7um",
"created": "2024-11-01 13:41:20.073Z",
"updated": "2024-11-01 13:41:20.073Z",
"name": "groups",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "fsddeday",
"name": "name",
"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("b3bw2apayoyh7um");
return dao.deleteCollection(collection);
})