fix: consolidate CMS page seed scripts and fix 3 bugs
- Fix `ContentPage.store_id is None` (Python identity check, always False) → use `.is_(None)` for proper SQLAlchemy NULL filtering - Create pages for ALL platforms instead of only OMS - Merge create_platform_pages.py into create_default_content_pages.py (5 overlapping pages, only platform_homepage was unique) - Delete redundant create_platform_pages.py - Update Makefile, install.py, and docs references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
17
Makefile
17
Makefile
@@ -104,22 +104,19 @@ init-prod:
|
||||
@echo "Step 0/6: Ensuring database exists (running migrations)..."
|
||||
@$(PYTHON) -m alembic upgrade heads
|
||||
@echo ""
|
||||
@echo "Step 1/6: Creating admin user and platform settings..."
|
||||
@echo "Step 1/5: Creating admin user and platform settings..."
|
||||
$(PYTHON) scripts/seed/init_production.py
|
||||
@echo ""
|
||||
@echo "Step 2/6: Initializing log settings..."
|
||||
@echo "Step 2/5: Initializing log settings..."
|
||||
$(PYTHON) scripts/seed/init_log_settings.py
|
||||
@echo ""
|
||||
@echo "Step 3/6: Creating default CMS content pages..."
|
||||
@echo "Step 3/5: Creating default CMS content pages..."
|
||||
$(PYTHON) scripts/seed/create_default_content_pages.py
|
||||
@echo ""
|
||||
@echo "Step 4/6: Creating platform pages and landing..."
|
||||
$(PYTHON) scripts/seed/create_platform_pages.py
|
||||
@echo ""
|
||||
@echo "Step 5/6: Seeding email templates..."
|
||||
@echo "Step 4/5: Seeding email templates..."
|
||||
$(PYTHON) scripts/seed/seed_email_templates.py
|
||||
@echo ""
|
||||
@echo "Step 6/6: Seeding subscription tiers..."
|
||||
@echo "Step 5/5: Seeding subscription tiers..."
|
||||
@echo " (Handled by init_production.py Step 6)"
|
||||
@echo ""
|
||||
@echo "✅ Production initialization completed"
|
||||
@@ -195,10 +192,6 @@ create-cms-defaults:
|
||||
$(PYTHON) scripts/seed/create_default_content_pages.py
|
||||
@echo "✅ CMS defaults created"
|
||||
|
||||
create-platform-pages:
|
||||
@echo "🏠 Creating platform pages and landing..."
|
||||
$(PYTHON) scripts/seed/create_platform_pages.py
|
||||
@echo "✅ Platform pages created"
|
||||
|
||||
init-logging:
|
||||
@echo "📝 Initializing log settings..."
|
||||
|
||||
Reference in New Issue
Block a user