{"categories":[{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/4"}],"enrichment":{"capability":"Adds a safemigrate command to Django that selectively runs migrations marked as safe before deployment, blocking unsafe ones and preventing deployment-order errors.","skillfed_tags":["django-extension","deployment-safety","database-migrations"],"use_cases":["Mark a migration that adds a new column as Safe.before_deploy so it runs during the pre-deployment phase, before new code is live.","Mark a migration that removes a deprecated column as Safe.after_deploy so it only runs after the code no longer references it.","Use Safe.after_deploy(delay=timedelta(days=7)) to defer a destructive migration for a week, reducing risk of rollback.","Enable nonstrict mode in development to allow migrations to accumulate between developers without blocking the safemigrate command.","Use the pre-commit hook to enforce that all migrations in a repository are explicitly marked with a safe value."],"what_it_does":"django-safemigrate is a Django extension that adds a safemigrate command to control when migrations run relative to code deployment. It lets you mark each migration as safe to run before deployment (e.g., adding a column), after deployment (e.g., removing a column), or always safe. When you run safemigrate, only migrations marked as safe for the current deployment phase will execute; if an unsafe migration blocks a safe one, the command fails rather than proceeding.\n\nThe package solves a common deployment problem: running the wrong migrations at the wrong time can cause downtime or data loss. By explicitly marking migrations and enforcing their order, it prevents accidental unsafe runs. It supports a delay mechanism for after-deploy migrations, nonstrict mode for development, and integrates with pre-commit to catch unmarked migrations before they reach version control. The normal migrate command continues to work unchanged.","worth_installing":"Yes, if you deploy Django applications and want to reduce deployment-order migration errors. The low install friction and permissive license make it a safe add. However, the aging maintenance status (437 days since last release) means you should verify compatibility with your Django version before relying on it in production."},"id":"django-safemigrate","links":{"html":"https://skillfed.io/packages/django-safemigrate","md":"https://skillfed.io/packages/django-safemigrate.md","pypi":"https://pypi.org/project/django-safemigrate/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-06-03","license_spdx":null,"license_treatment":"permissive","name":"django-safemigrate","python_support":"supports_current","summary":"Safely run migrations before deployment"},"popularity":{"monthly_downloads":97551,"position":13147,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"6.0"}
