migrations-data-model-changes

Plan and execute Django and Postgres schema migrations with rollback strategies.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/Luis-ERP/dev-agent-crew --skill migrations-data-model-changes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrations-data-model-changes
Source: https://github.com/Luis-ERP/dev-agent-crew/tree/main/skills/migrations-data-model-changes
Command: npx skills add https://github.com/Luis-ERP/dev-agent-crew --skill migrations-data-model-changes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes how to change schemas safely, how to backfill data, and how to avoid outages or irreversible migrations in a Django + Postgres application.

Core Features & Use Cases

  • Safe schema evolution: add/alter/remove fields, constraints, and indexes with risk-aware plans.
  • Idempotent backfills: design and implement resumable data migrations to populate new fields without downtime.
  • Rollback & verification: document rollback strategies and verify migrations with clear operational notes.

Quick Start

Begin by outlining the design in 02-design.md, then generate Django migrations and apply them with makemigrations and migrate, followed by a controlled backfill plan.

Frequently Asked Questions about migrations-data-model-changes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely add a required field to a Django model without locking the Postgres database?

To safely add a required Django model field without Postgres table locks, you must follow a migration-first discipline: deploy the schema change as nullable, backfill the data, then enforce the constraint in a subsequent migration to minimize downtime.

What is the best way to backfill data in Postgres during a Django schema migration?

Backfilling Postgres data during a Django migration requires designing resumable, idempotent data migrations. This approach populates new fields incrementally without downtime, ensuring the data migration can safely restart if interrupted.

How do I design a rollback strategy for Django migrations and Postgres schema changes?

Designing a rollback strategy for Django migrations involves documenting explicit operational notes and verification steps before applying changes. You plan the reverse migration path for models, constraints, and indexes to ensure schema changes are reversible.

Can I use this approach for zero downtime Postgres index creation in Django?

Yes, this approach supports zero downtime Postgres index creation by applying risk-aware schema evolution plans. You generate Django migrations that use concurrent index creation to avoid locking the table during the deployment.

When do I need an explicit migration-first design document for Django data model changes?

You need an explicit migration-first design document for Django data model changes whenever you must alter models, constraints, or indexes. It standardizes the plan to prevent outages and irreversible migrations in your Postgres application.