domaino/pocketbase/pb_migrations
agent e30e1d3beb Shop hooks: bundles, codes (passes) and orders paid with codes
A bundle (items.type `bundle`) has its own price, parts (a service at a
length × count, or a product × count) and a validity in months. Buying one
creates a pass with an 8-character code; its parts are snapshotted with
their share of the price. Applying a code to a basket covers matching
bookings (same service and length) while places are left — counted from
order lines and live holds, never stored. A fully covered basket is
confirmed without Stripe.

Admin routes list, void/extend and issue codes; GDPR export, correction,
erasure and retention cover passes (erasure keeps the code working).

orders.total, orders.stripePaymentIntentId and order_lines.price are no
longer required: PocketBase treats 0 / '' as blank, and a code-paid order
has neither a payment nor a price.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 21:25:04 +00:00
..
1791244800_lock_rules_dates_unique.js PocketBase: close public sign-up, lock commerce writes, add dates/unique keys 2026-10-06 10:55:12 +00:00
1791331200_lock_order_lines.js Lock order_lines writes (they were public) 2026-10-06 12:34:51 +00:00
1792800000_items_buffer_minutes.js Services: per-service get-ready time (items.bufferMinutes) 2026-10-24 07:41:17 +00:00
1792800100_slot_capacity_and_line_holds.js Shop: places per slot, and bookings block overlapping slots 2026-10-24 08:26:37 +00:00
1793000000_orders_anonymise.js Customers page: export, correct and erase personal data; automatic retention 2026-10-24 10:44:45 +00:00
1793100000_durations_and_time_windows.js Windows: choose the start-time step (10–60 min, default 30) 2026-10-25 21:03:40 +00:00
1793200000_bundles_and_passes.js Shop hooks: bundles, codes (passes) and orders paid with codes 2026-10-25 21:25:04 +00:00