File: pgmakemigrations.py

package info (click to toggle)
python-django-postgres-extra 2.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,096 kB
  • sloc: python: 9,057; makefile: 17; sh: 7; sql: 1
file content (13 lines) | stat: -rw-r--r-- 426 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
from django.core.management.commands import (  # type: ignore[attr-defined]
    makemigrations,
)

from psqlextra.backend.migrations import postgres_patched_migrations


class Command(makemigrations.Command):
    help = "Creates new PostgreSQL specific migration(s) for apps."

    def handle(self, *app_labels, **options):
        with postgres_patched_migrations():
            return super().handle(*app_labels, **options)