Files
wanderer/db/pb_migrations/1706294795_created_trails.js
Christian Beutel b302ccded0 initial commit
2024-01-27 20:39:12 +01:00

72 lines
1.6 KiB
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const collection = new Collection({
"id": "e864strfxo14pm4",
"created": "2024-01-26 18:46:35.843Z",
"updated": "2024-01-26 18:46:35.843Z",
"name": "trails",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "wquvuytd",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "jjiidvbm",
"name": "thumbnail",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
},
{
"system": false,
"id": "6kkucam1",
"name": "description",
"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("e864strfxo14pm4");
return dao.deleteCollection(collection);
})