diff options
Diffstat (limited to 'pb_migrations')
| -rw-r--r-- | pb_migrations/1780384083_created_charts.js | 150 | ||||
| -rw-r--r-- | pb_migrations/1780388159_updated_charts.js | 30 | ||||
| -rw-r--r-- | pb_migrations/1780388818_updated_charts.js | 20 | ||||
| -rw-r--r-- | pb_migrations/1780390881_updated_charts.js | 20 |
4 files changed, 220 insertions, 0 deletions
diff --git a/pb_migrations/1780384083_created_charts.js b/pb_migrations/1780384083_created_charts.js new file mode 100644 index 0000000..4e92ef3 --- /dev/null +++ b/pb_migrations/1780384083_created_charts.js @@ -0,0 +1,150 @@ +/// <reference path="../pb_data/types.d.ts" /> +migrate((app) => { + const collection = new Collection({ + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "help": "", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "exceptDomains": null, + "help": "", + "hidden": false, + "id": "url2000601280", + "name": "lrc", + "onlyDomains": null, + "presentable": false, + "required": false, + "system": false, + "type": "url" + }, + { + "exceptDomains": null, + "help": "", + "hidden": false, + "id": "url1781309708", + "name": "media", + "onlyDomains": null, + "presentable": false, + "required": false, + "system": false, + "type": "url" + }, + { + "exceptDomains": null, + "help": "", + "hidden": false, + "id": "url3277268710", + "name": "thumbnail", + "onlyDomains": null, + "presentable": false, + "required": false, + "system": false, + "type": "url" + }, + { + "autogeneratePattern": "", + "help": "", + "hidden": false, + "id": "text22648455", + "max": 0, + "min": 0, + "name": "artist", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "help": "", + "hidden": false, + "id": "text724990059", + "max": 0, + "min": 0, + "name": "title", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "help": "", + "hidden": false, + "id": "number1493879504", + "max": null, + "min": null, + "name": "offset", + "onlyInt": false, + "presentable": false, + "required": false, + "system": false, + "type": "number" + }, + { + "help": "", + "hidden": false, + "id": "number3144380399", + "max": null, + "min": null, + "name": "difficulty", + "onlyInt": false, + "presentable": false, + "required": false, + "system": false, + "type": "number" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "pbc_4148374969", + "indexes": [], + "listRule": null, + "name": "charts", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }); + + return app.save(collection); +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_4148374969"); + + return app.delete(collection); +}) diff --git a/pb_migrations/1780388159_updated_charts.js b/pb_migrations/1780388159_updated_charts.js new file mode 100644 index 0000000..2fd10a1 --- /dev/null +++ b/pb_migrations/1780388159_updated_charts.js @@ -0,0 +1,30 @@ +/// <reference path="../pb_data/types.d.ts" /> +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_4148374969") + + // add field + collection.fields.addAt(8, new Field({ + "autogeneratePattern": "", + "help": "", + "hidden": false, + "id": "text105650625", + "max": 0, + "min": 0, + "name": "category", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + })) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_4148374969") + + // remove field + collection.fields.removeById("text105650625") + + return app.save(collection) +}) diff --git a/pb_migrations/1780388818_updated_charts.js b/pb_migrations/1780388818_updated_charts.js new file mode 100644 index 0000000..2517c71 --- /dev/null +++ b/pb_migrations/1780388818_updated_charts.js @@ -0,0 +1,20 @@ +/// <reference path="../pb_data/types.d.ts" /> +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_4148374969") + + // update collection data + unmarshal({ + "listRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_4148374969") + + // update collection data + unmarshal({ + "listRule": null + }, collection) + + return app.save(collection) +}) diff --git a/pb_migrations/1780390881_updated_charts.js b/pb_migrations/1780390881_updated_charts.js new file mode 100644 index 0000000..b9f84ef --- /dev/null +++ b/pb_migrations/1780390881_updated_charts.js @@ -0,0 +1,20 @@ +/// <reference path="../pb_data/types.d.ts" /> +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_4148374969") + + // update collection data + unmarshal({ + "viewRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_4148374969") + + // update collection data + unmarshal({ + "viewRule": null + }, collection) + + return app.save(collection) +}) |
