Skip to content

Migration Documentation

This directory contains comprehensive migration documentation for the Barodybroject Django application, particularly focused on the v0.2.0 release changes.

Contents

Major Migrations

  • MIGRATION_GUIDE.md - Comprehensive v0.2.0 migration guide
  • Database migration procedures
  • Template system migrations
  • Infrastructure migrations
  • Application configuration changes
  • Rollback procedures

  • CMS_REMOVAL_GUIDE.md - Django CMS removal documentation

  • Rationale for CMS removal
  • Detailed changes by component (settings, models, views, templates)
  • Impact assessment
  • Restoration guide for future CMS re-integration
  • Preservation strategy (commenting vs deletion)

Migration Strategy

The v0.2.0 release involves significant architectural changes:

What Changed

  1. Django CMS Removal: Temporarily disabled to simplify deployment
  2. Infrastructure Migration: Moved from App Service to Container Apps
  3. Port Standardization: Unified port configuration across all environments
  4. Template Modernization: Converted from CMS-integrated to pure Django templates

What Was Preserved

  • ✅ Core database models (Post, Category, Tag)
  • ✅ User authentication system
  • ✅ Admin interface functionality
  • ✅ REST API endpoints
  • ✅ All CMS code (commented, not deleted)

Quick Start

For Existing Deployments

  1. Backup your database:

    pg_dump barodydb > backup_pre_v0.2.0.sql
    

  2. Review migration guide:

  3. Read MIGRATION_GUIDE.md completely
  4. Understand database migration impact
  5. Review template changes

  6. Apply migrations:

    python manage.py migrate
    

  7. Update templates (if customized):

  8. Remove CMS template tags
  9. Convert placeholders to blocks
  10. Update navigation structure

For New Deployments

New deployments start with the simplified architecture: - No CMS dependencies - Pure Django template system - Container Apps infrastructure

See ../deployment/DEPLOYMENT-GUIDE-MINIMAL.md for deployment instructions.

CMS Restoration

The CMS removal was implemented as temporary commenting rather than permanent deletion. To restore CMS functionality:

  1. Uncomment CMS-related code in:
  2. settings.py - INSTALLED_APPS and MIDDLEWARE
  3. models.py - CMS plugin models
  4. admin.py - CMS admin mixins
  5. views.py - CMS imports
  6. urls.py - CMS URL patterns

  7. Restore CMS templates:

  8. Uncomment CMS template tags
  9. Add back placeholders and toolbars

  10. Apply CMS migrations:

    python manage.py migrate cms
    python manage.py migrate menus
    

For detailed restoration instructions, see CMS_REMOVAL_GUIDE.md.

Migration Categories

1. Database Migrations

  • Core models preserved
  • CMS tables intact but unused
  • No data loss strategy

2. Template System

  • Pure Django template inheritance
  • Bootstrap 5.3.3 integration
  • Responsive design preserved

3. Infrastructure

  • App Service → Container Apps
  • Port standardization (8000)
  • Environment configuration updates

4. Application Configuration

  • Simplified INSTALLED_APPS
  • Reduced MIDDLEWARE stack
  • Updated template context processors

Rollback Procedures

Each migration guide includes rollback procedures:

  • Database: Restore from backup
  • Templates: Git revert to v0.1.x
  • Infrastructure: Redeploy previous version
  • CMS: Uncomment all CMS code

See MIGRATION_GUIDE.md for detailed rollback instructions.

Testing Migrations

Before applying migrations to production:

  1. Test in development container:

    docker-compose -f .devcontainer/docker-compose_dev.yml up
    

  2. Run migration validation:

    python manage.py migrate --plan
    python manage.py check
    

  3. Test core functionality:

    python manage.py test
    

  4. Verify data integrity:

  5. Check post count
  6. Verify user authentication
  7. Test admin access

Support

For migration issues: - Review detailed guides in this directory - Check ../TROUBLESHOOTING.md - Create issue with migration label on GitHub