From 5b53d602bf4d7e55afed7d0d82a88122caae557f Mon Sep 17 00:00:00 2001 From: rajun Date: Tue, 27 Oct 2026 16:28:47 +0530 Subject: [PATCH] feat: add per-project AR page options migration --- pb_migrations/1791880000_project_ar_page.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pb_migrations/1791880000_project_ar_page.js diff --git a/pb_migrations/1791880000_project_ar_page.js b/pb_migrations/1791880000_project_ar_page.js new file mode 100644 index 0000000..e0db1a7 --- /dev/null +++ b/pb_migrations/1791880000_project_ar_page.js @@ -0,0 +1,13 @@ +/// + +// 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); +});