django-migration-psql

Installation
SKILL.md

When to use

  • Creating a new Django migration
  • Running makemigrations or pgmakemigrations
  • Reviewing a PR that adds or modifies migrations
  • Adding indexes, constraints, or models to the database

Why this matters

A bad migration can lock a production table for minutes, block all reads/writes, or silently skip index creation on partitioned tables.

Auto-generated migrations need splitting

makemigrations and pgmakemigrations bundle everything into one file: CreateModel, AddIndex, AddConstraint, sometimes across multiple tables. This is the default Django behavior and it violates every rule below.

After generating a migration, ALWAYS review it and split it:

  1. Read the generated file and identify every operation
  2. Group operations by concern:
Related skills
Installs
8
GitHub Stars
13.8K
First Seen
Mar 19, 2026