{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/3"}],"enrichment":{"capability":"Provides a Django database backend for PostgreSQL that executes migrations while minimizing table locks, enabling schema changes without application downtime.","skillfed_tags":["postgres-migrations","zero-downtime-deployment","django-backend"],"use_cases":["Deploying schema changes to a live PostgreSQL database serving multiple application instances without taking the application offline.","Adding or modifying columns and indexes on large tables where standard Django migrations would cause extended lock times.","Recovering from partial migration failures by re-running failed migrations in idempotent mode after fixing underlying data issues.","Enforcing safe migration practices by raising errors on potentially unsafe operations when ZERO_DOWNTIME_MIGRATIONS_RAISE_FOR_UNSAFE is enabled.","Managing long-running operations like index creation or constraint validation without triggering global statement timeouts."],"what_it_does":"django-pg-zero-downtime-migrations is a custom Django database backend for PostgreSQL that replaces the standard backend to apply schema migrations while respecting database-level locks. Instead of using transactions for all migrations (which can cause table locks and downtime), it applies schema changes and SQL operations in a way that minimizes lock contention and allows the application to remain available during deployment.\n\nThe package works by managing PostgreSQL's table-level locks\u2014ACCESS EXCLUSIVE, SHARE UPDATE EXCLUSIVE, and others\u2014and applying configurable timeouts to prevent long-running operations from blocking application queries. It requires careful deployment orchestration: migrations are applied first, then application instances are restarted one at a time behind a load balancer to ensure the old and new application versions both work with the new schema. The package is in beta and does not apply zero-downtime guarantees to RunPython operations, only to schema and RunSQL migrations.","worth_installing":"Yes, with conditions. Install this if you need zero-downtime schema migrations on PostgreSQL and can follow the deployment flow (apply migrations, then restart instances one at a time). The package is mature enough for production use (MIT licensed, actively maintained, 573 stars) but remains in beta\u2014test all migrations thoroughly before production deployment. Not suitable if your migrations rely heavily on RunPython operations or if you cannot orchestrate instance restarts behind a load balancer."},"id":"django-pg-zero-downtime-migrations","links":{"html":"https://skillfed.io/packages/django-pg-zero-downtime-migrations","md":"https://skillfed.io/packages/django-pg-zero-downtime-migrations.md","pypi":"https://pypi.org/project/django-pg-zero-downtime-migrations/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-06-06","license_spdx":null,"license_treatment":"permissive","name":"django-pg-zero-downtime-migrations","python_support":"supports_current","summary":"Django postgresql backend that apply migrations with respect to database locks"},"popularity":{"monthly_downloads":263718,"position":8351,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.19"}
