feat: add per-project AR page options migration
This commit is contained in:
parent
87e1d279ee
commit
5b53d602bf
13
pb_migrations/1791880000_project_ar_page.js
Normal file
13
pb_migrations/1791880000_project_ar_page.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/// <reference path="../pocketbase/pb_data/types.d.ts" />
|
||||||
|
|
||||||
|
// What each project's AR page shows: bars, model name, logo backing, thob logo and button size.
|
||||||
|
// One JSON field, so new options don't need a migration; empty means thob's defaults.
|
||||||
|
migrate((app) => {
|
||||||
|
const projects = app.findCollectionByNameOrId("projects");
|
||||||
|
projects.fields.add(new Field({ type: "json", name: "ar_page", maxSize: 2000 }));
|
||||||
|
app.save(projects);
|
||||||
|
}, (app) => {
|
||||||
|
const projects = app.findCollectionByNameOrId("projects");
|
||||||
|
projects.fields.removeByName("ar_page");
|
||||||
|
app.save(projects);
|
||||||
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user