feat: add Phase 2 migration, make urls command, fix seed script

- Create loyalty_003 migration: company-based architecture (adds
  company_id to all loyalty tables, creates company_loyalty_settings,
  renames vendor_id to enrolled_at_vendor_id on cards)
- Move platform migration back to alembic/versions (not loyalty-specific)
- Add version_locations to alembic.ini for module migration discovery
- Add make urls/urls-dev/urls-prod commands (scripts/show_urls.py)
- Fix seed_demo.py: import all module models to resolve SQLAlchemy
  string relationships, fix multiple admin query, set platform_id
  on vendor content pages
- Fix loyalty test fixtures to match Phase 2 model columns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-06 20:56:07 +01:00
parent 994c6419f0
commit 922616c9e3
7 changed files with 861 additions and 29 deletions

View File

@@ -2,7 +2,8 @@
[alembic]
script_location = alembic
prepend_sys_path = .
version_path_separator = os
version_path_separator = space
version_locations = alembic/versions app/modules/loyalty/migrations/versions
# This will be overridden by alembic\env.py using settings.database_url
sqlalchemy.url =
# for PROD: sqlalchemy.url = postgresql://username:password@localhost:5432/ecommerce_db