--- id: django-syzygy version: "1.2.3" license: MIT License license_treatment: permissive maintenance: active --- # django-syzygy — Deployment aware tooling for Django migrations. License: permissive · Maintenance: active · Downloads: 108.7K/mo ## What it is and what it does django-syzygy is a Django application that restructures how migrations are sequenced during deployment. It addresses a core problem in continuous deployment: when you roll out code changes, old and new code versions must coexist briefly, but Django's default migrations don't account for this. For example, adding a field with a default value removes the database-level default immediately, breaking inserts from the old code that doesn't know the field exists yet. The package introduces the concept of prerequisite (pre-deploy) and postponed (post-deploy) migrations. It automatically splits problematic operations—like field additions and removals—into multiple stages, and provides a `--pre-deploy` flag to the migrate command so your CI/CD pipeline can run migrations before code rollout, then apply deferred changes after. It's tested on PostgreSQL, SQLite, and MySQL, though MySQL's lack of transactional DDL means failed migrations may require manual intervention. Use it for: - Running migrations before deploying new code in a continuous deployment pipeline to prevent schema conflicts - Safely adding fields to models without breaking existing application instances still using the old schema - Removing fields in stages so both old and new code versions can operate during a gradual rollout - Enforcing safe migration sequencing through system checks that prevent mixing pre- and post-deploy operations in a single migration ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Automates Django database migration deployment by splitting operations into pre-deployment and post-deployment stages, preventing schema conflicts when old and new code versions coexist during rollout. Yes, if you use Django in a continuous deployment environment where old and new code versions coexist during rollouts. The package solves a real problem that standard Django migrations don't handle well. Install friction is low and maintenance is active. Not necessary for single-instance deployments or applications that tolerate brief downtime during migrations. MySQL users should be aware that transactional DDL is not supported, requiring manual intervention on failed migrations. ## Install pip install django-syzygy uv add django-syzygy poetry add django-syzygy ## Installing django-syzygy Before you install: Low install friction with a single Django dependency. Actively maintained with recent commits and a stable release history since 2021. Overrides Django's default migration commands, so compatibility with other migration-related packages may require custom command inheritance. License in practice: MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install django-syzygy # settings.py INSTALLED_APPS = [ ... 'syzygy', ... ] # In your CI/CD pipeline: # Before rollout: python manage.py migrate --pre-deploy # After rollout: python manage.py migrate Overrides Django's default makemigrations and migrate commands; if using other migration-related packages, you may need to define custom command classes that inherit from all involved packages' command definitions. Verify before relying: - Whether the package handles all Django 5.2 migration edge cases or if further testing is needed - Performance impact on large migration sets or complex schemas - Rollback behavior and recovery procedures when migrations fail mid-deployment ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 108.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django migration deployment, zero-downtime database migrations, pre-deploy post-deploy migrations, django schema change sequencing, continuous deployment migrations, django migration staging, django-migrations, zero-downtime-deployment, ci-cd [View on SkillFed](https://skillfed.io/packages/django-syzygy) · [View on PyPI](https://pypi.org/project/django-syzygy/)