fix(loyalty): route prefix, module migrations, and wallet barcode tests

- Fix 404 on /admin/loyalty/* and /vendor/loyalty/* by applying
  ROUTE_CONFIG custom_prefix when registering page routers in main.py
  (admin, vendor, and storefront registrations all updated)
- Move loyalty alembic migrations from central alembic/versions/ into
  app/modules/loyalty/migrations/versions/ with proper naming convention
- Add migrations_path="migrations" to loyalty module definition so
  the auto-discovery system finds them
- Add unit tests for Apple/Google Wallet Code 128 barcode configuration
  (6 Apple tests, 4 Google tests)
- Add integration tests for module migration auto-discovery (4 tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-06 19:00:27 +01:00
parent 74bbf84702
commit 994c6419f0
5 changed files with 157 additions and 7 deletions

View File

@@ -166,6 +166,7 @@ loyalty_module = ModuleDefinition(
schemas_path="app.modules.loyalty.schemas",
exceptions_path="app.modules.loyalty.exceptions",
tasks_path="app.modules.loyalty.tasks",
migrations_path="migrations",
# =========================================================================
# Scheduled Tasks
# =========================================================================