Add pocketbase migrations
This commit is contained in:
parent
c75003f5f0
commit
0d330c4f60
13 changed files with 547 additions and 0 deletions
41
pb_migrations/1702060887_created_tasklists.js
Normal file
41
pb_migrations/1702060887_created_tasklists.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const collection = new Collection({
|
||||
"id": "i42xt9r6ykqdq3j",
|
||||
"created": "2023-12-08 18:41:27.908Z",
|
||||
"updated": "2023-12-08 18:41:27.908Z",
|
||||
"name": "tasklists",
|
||||
"type": "base",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"system": false,
|
||||
"id": "gjhxaxm4",
|
||||
"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("i42xt9r6ykqdq3j");
|
||||
|
||||
return dao.deleteCollection(collection);
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue