Add pocketbase migrations
This commit is contained in:
parent
c75003f5f0
commit
0d330c4f60
13 changed files with 547 additions and 0 deletions
59
pb_migrations/1702062145_created_completions.js
Normal file
59
pb_migrations/1702062145_created_completions.js
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const collection = new Collection({
|
||||
"id": "jebj4y3fqo5gtte",
|
||||
"created": "2023-12-08 19:02:25.763Z",
|
||||
"updated": "2023-12-08 19:02:25.763Z",
|
||||
"name": "completions",
|
||||
"type": "base",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"system": false,
|
||||
"id": "dcsjlzex",
|
||||
"name": "task",
|
||||
"type": "relation",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"collectionId": "pf13z4hs1iubw41",
|
||||
"cascadeDelete": false,
|
||||
"minSelect": null,
|
||||
"maxSelect": 1,
|
||||
"displayFields": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "ewnc7huz",
|
||||
"name": "user",
|
||||
"type": "relation",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"collectionId": "_pb_users_auth_",
|
||||
"cascadeDelete": false,
|
||||
"minSelect": null,
|
||||
"maxSelect": 1,
|
||||
"displayFields": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"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("jebj4y3fqo5gtte");
|
||||
|
||||
return dao.deleteCollection(collection);
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue