$npx skillfedfor your agent

django-migration-psql

This skill audits Django migration files against PostgreSQL safety rules, catching common mistakes like bundling index creation with model definitions, mixing indexes across tables, and mishandling partitioned table indexes. It enforces separation of concerns—structural changes in one migration, performance indexes in another—and provides the two-step pattern required for partitioned tables to ensure indexes apply to all existing partitions without locking production data.

django-migration-psql reviews Django migrations for PostgreSQL best practices to prevent production table locks and data issues.

AI-generated summary based on this skill's SKILL.md

14,491 2,285 Apache-2.0updated by prowler-cloud

Decision gist · record as of 2026-07-27

django-migration-psql reviews Django migrations for PostgreSQL best practices to prevent production table locks and data issues. This skill audits Django migration files against PostgreSQL safety rules, catching common mistakes like bundling index creation with model definitions, mixing indexes across tables, and mishandling partitioned table indexes. It enforces separation of concerns—structural changes in one migration, performance indexes in another—and provides the two-step pattern required for partitioned tables to ensure indexes apply to all existing partitions without locking production data.

manual: git clone https://github.com/prowler-cloud/prowler → cp -r prowler/skills/django-migration-psql ~/.claude/skills/django-migration-psql
skills/django-migration-psql/SKILL.md · version 6ec6bc67

Use it when

  • django-migration-psql enforces splitting auto-generated migrations into separate concerns: keep structural changes (CreateModel.
  • django-migration-psql supports concurrent index creation on partitioned tables without locking production.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

prowler-cloud/prowler/django-migration-psql · repository language: Python

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What does django-migration-psql help with?

django-migration-psql audits Django migration files against PostgreSQL safety rules, catching common mistakes like bundling index creation with model definitions, mixing indexes across tables, and mishandling partitioned table indexes. It enforces separation of concerns—structural changes in one migration, performance indexes in another—and provides the two-step pattern required for partitioned tables to ensure indexes apply to all existing partitions without locking production data.

How should I split django migrations for PostgreSQL?

django-migration-psql enforces splitting auto-generated migrations into separate concerns: keep structural changes (CreateModel, AddField) in one migration and performance indexes in another. For partitioned tables, use a two-step pattern: first create the index on the parent table, then apply it to existing partitions. This separation prevents locking production data and ensures indexes apply correctly across all partitions.

How do I create index concurrently in django migrations?

django-migration-psql supports concurrent index creation on partitioned tables without locking production. Use the two-step pattern: create the index on the parent table in one migration with `atomic=False`, then apply it to existing partitions in a follow-up migration. This approach prevents blocking production queries while ensuring all partitions receive the index.

What does django migration review checklist include?

django-migration-psql's review checklist validates that migrations follow PostgreSQL best practices: indexes are separated from model definitions, partitioned table indexes use the two-step pattern, data backfills use batched Celery tasks, migrations avoid unnecessary locking, and structural changes are isolated from performance tuning. It also checks for proper use of `atomic=False` and constraint handling.

Can django-migration-psql help with data backfill migrations?

Yes. django-migration-psql supports implementing batched data backfills safely using Celery tasks within migrations. Instead of loading all data into memory at once, use RunPython with batched queries and Celery task scheduling to backfill large tables incrementally, reducing memory overhead and production impact.

How does django-migration-psql handle partitioned table indexes?

django-migration-psql enforces a two-step pattern for partitioned table indexes: first create the index on the parent table without locking production, then apply it to existing partitions in a separate migration. This ensures indexes apply to all partitions correctly and prevents the common mistake of creating indexes that miss existing partition data.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

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

(truncated - see the full file via the links below)

File tree — 1 file
skills/django-migration-psql/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Review Django migration files for PostgreSQL correctness and safety”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

prowler-api
by prowler-cloud · prowler-cloud/prowler

This skill guides implementation of Prowler's multi-tenant API architecture, covering row-level security enforcement, role-based access control, provider validation, and async task patterns. Learn the 4-database setup, RLS model constraints, M2M through-model requirements, and critical decorator ordering for tenant-isolated operations.

Apache-2.0updated Jul 2026
★ 14,491repo stars
prowler-test-api
by prowler-cloud · prowler-cloud/prowler

This skill equips you with battle-tested patterns for writing Prowler API tests, covering JSON:API request formatting, cross-tenant isolation via row-level security, role-based access control, and Celery task mocking. It includes a fixture dependency chain, response status code reference, and explicit rules for avoiding common pitfalls like TruffleHog false positives and incorrect content-type headers.

Apache-2.0updated Jul 2026
★ 14,491repo stars
tdd
by prowler-cloud · prowler-cloud/prowler

tdd guides you through mandatory test-driven development across all Prowler components using the red-green-refactor cycle. Learn to write failing tests first, implement minimum code to pass, triangulate with edge cases, and refactor with confidence. Covers TypeScript/React, Python SDK, and Django API stacks with practical examples.

Apache-2.0updated Jul 2026
★ 14,491repo stars
prowler-changelog
by prowler-cloud · prowler-cloud/prowler

Prowler-changelog automates changelog management across UI, API, MCP Server, and SDK components using a fragment-based system that prevents merge conflicts on concurrent PRs. Each change gets its own fragment file under `changelog.d/` directories, which compile into versioned `CHANGELOG.md` files at release time. The skill enforces semantic versioning rules, validates fragment format, and requires explicit confirmation before any changelog edits.

Apache-2.0updated Jul 2026
★ 14,491repo stars
prowler-compliance-review
by prowler-cloud · prowler-cloud/prowler

This skill streamlines pull request reviews for compliance framework updates by validating JSON syntax, checking for duplicate requirement IDs, and ensuring framework metadata completeness. It applies a structured checklist covering file location, changelog fragments, and dashboard patterns to catch issues before merge.

Apache-2.0updated Jul 2026
★ 14,491repo stars
prowler-provider
by prowler-cloud · prowler-cloud/prowler

Prowler-provider guides you through adding new cloud providers or services to the Prowler SDK. It provides the required directory structure, class templates for providers and services, and patterns for handling authentication and CLI arguments securely.

Apache-2.0updated Jul 2026
★ 14,491repo stars

More skills prowler-commit (Apache-2.0) · prowler-docs (Apache-2.0)

Tags
schema-designdatabase-lockingconcurrent-indexingdata-migrationpartition-strategyproduction-safetytransaction-managementperformance-optimizationrollback-safety