Add storefronts:import-legacy command

One-time importer that copies legacy menu/shop storefronts (and their
products, stored inline in qr_codes.payload.content.sections) from the
shared platform DB into this app's database, so owners who created them
before the Merchant extraction can see/manage them again.

- Maps platform owners to local users by public_id (SSO sub), creating a
  local user stub when missing
- Copies product images from a new read-only `platform_qr` disk
  (PLATFORM_QR_ROOT) to the local `qr` disk
- Idempotent (skips existing short_codes unless --refresh); supports
  --user, --dry-run, --skip-images

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
isaacclad
2026-06-10 17:06:49 +00:00
co-authored by Claude Opus 4.8
parent a939abc2de
commit 37425f5ad1
2 changed files with 242 additions and 0 deletions
+10
View File
@@ -67,6 +67,16 @@ return [
'report' => false,
],
// Read-only view of the monolith's QR storage, used by the
// storefronts:import-legacy command to copy legacy product images.
// Set PLATFORM_QR_ROOT to the monolith's storage/app/private/qr path.
'platform_qr' => [
'driver' => 'local',
'root' => env('PLATFORM_QR_ROOT', storage_path('app/private/qr')),
'throw' => false,
'report' => false,
],
],
/*