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

@@ -1,7 +1,7 @@
# Wizamart Multi-Tenant E-Commerce Platform Makefile
# Cross-platform compatible (Windows & Linux)
.PHONY: install install-dev install-docs install-all dev test test-coverage lint format check docker-build docker-up docker-down clean help tailwind-install tailwind-dev tailwind-build tailwind-watch arch-check arch-check-file arch-check-object test-db-up test-db-down test-db-reset test-db-status celery-worker celery-beat celery-dev flower celery-status celery-purge
.PHONY: install install-dev install-docs install-all dev test test-coverage lint format check docker-build docker-up docker-down clean help tailwind-install tailwind-dev tailwind-build tailwind-watch arch-check arch-check-file arch-check-object test-db-up test-db-down test-db-reset test-db-status celery-worker celery-beat celery-dev flower celery-status celery-purge urls
# Detect OS
ifeq ($(OS),Windows_NT)
@@ -477,6 +477,15 @@ verify-setup:
@echo "Running setup verification..."
@$(PYTHON) scripts/verify_setup.py
urls:
@$(PYTHON) scripts/show_urls.py
urls-dev:
@$(PYTHON) scripts/show_urls.py --dev
urls-prod:
@$(PYTHON) scripts/show_urls.py --prod
check-env:
@echo "Checking Python environment..."
@echo "Detected OS: $(DETECTED_OS)"
@@ -572,6 +581,9 @@ help:
@echo " docker-down - Stop Docker containers"
@echo ""
@echo "=== UTILITIES ==="
@echo " urls - Show all platform/vendor/storefront URLs"
@echo " urls-dev - Show development URLs only"
@echo " urls-prod - Show production URLs only"
@echo " clean - Clean build artifacts"
@echo " check-env - Check Python environment and OS"
@echo ""