pgmakemigrations.py 426 B

12345678910111213
  1. from django.core.management.commands import ( # type: ignore[attr-defined]
  2. makemigrations,
  3. )
  4. from psqlextra.backend.migrations import postgres_patched_migrations
  5. class Command(makemigrations.Command):
  6. help = "Creates new PostgreSQL specific migration(s) for apps."
  7. def handle(self, *app_labels, **options):
  8. with postgres_patched_migrations():
  9. return super().handle(*app_labels, **options)