Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

tj-pre-commit/django-makemigrations

Repository files navigation

django-makemigrations

Run Django's makemigrations as a pre-commit hook.

graphene-django-precommit-hook

pre-commit hook to generate django migrations

See pre-commit for installation instructions

Sample basic .pre-commit-config.yaml

-   repo: https://github.com/tj-pre-commit/django-makemigrations
    rev: v1.0.0
    hooks:
      - id: django-makemigrations
        stages: [commit]

Sample complex .pre-commit-config.yaml

-   repo: https://github.com/tj-pre-commit/django-makemigrations
    rev: v1.0.0
    hooks:
      - id: django-makemigrations
        stages: [commit]
        args: [
          '--settings',
          'project.settings',  # Defaults to: DJANGO_SETTINGS_MODULE
          '--merge',  # Enables fixing of migration conflicts.
          '--empty',  # Creates an empty migration.
          '--no-input',  # Do not prompt for user input.
          '--verbosity', # OR '-v'
          '2', # Set the verbosity level {0,1,2,3}
          #  See https://docs.djangoproject.com/en/3.1/ref/django-admin/#makemigrations for more information
        ]

About

Pre-commit hook for Django's makemigrations command.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.