测试与安全

django-safe-migration

vintasoftware/d…-plugins

Write, review, and rewrite Django migrations for PostgreSQL with zero-downtime guarantees. Use this skill whenever the user mentions migrations, Django schema changes, or deployment safety — even if they don't say "zero downtime" explicitly. Trigger on: "review this migration", "is this migration safe?", "write a migration for...", "rewrite this migration", "how do I add a NOT NULL column / drop a column / add an index / rename a column / add a FK without downtime", "will this migration cause locks?", "this migration is blocking production". Covers: SeparateDatabaseAndState two-file splits, AddIndexConcurrently, FK NOT VALID + VALIDATE, db_default for NOT NULL columns, lock_timeout, and RunPython safety rules.

  • 786 次安装
  • 166 星标
  • 收录于

安装命令

npx skills add https://github.com/vintasoftware/django-ai-plugins --skill django-safe-migration

SKILL.md

Django Migration — Zero Downtime

Project Configuration

Read the active host's project instruction file (for example, AGENTS.md or CLAUDE.md) for the values below. If they are not set, use the defaults shown.

Key Default Notes
Django version unknown Affects db_default availability — only Django 5.0+ supports it
Deploy strategy rolling deploy Rolling deploy is the most restrictive; blue/green or maintenance-window deploys allow more operations
Runtime guard none If a guard is configured (e.g. django-pg-zero-downtime-migrations), operations it blocks are Errors; uncovered operations are Warnings
Migration command python manage.py sqlmigrate e.g. make sqlmigrate or docker compose run web python manage.py sqlmigrate
Docs / wiki URL none If set, append #<anchor> links when flagging issues in review output

To configure this skill for your project, add a section like this to the active host's project instruction file: