Skip to main content

Django extension to inspect validity of migration files

Project description

Django-Migration-Inspector

License

Django-Migration-Inspector is a Python package that allows you to validate Django migrations in the command line.

Features

  • Validates whether Django migration files refer to valid files when defining dependencies or run-after.
  • Validates the dependency graph of the migration tree.
  • Ensured that migration history for the project on DB is linear.
  • Easy to integrate into your Django project.

Installation

You can install Django-Migration-Inspector using pip:

pip install django-migration-inspector

Usage

Add inspector to the INSTALLED_APPS inside the Django settings.

To use Django-Migration-Inspector, run the following command in your Django project:

python manage.py inspectmigrations

To run all the migration checks.

python manage.py inspectmigrations --skip-history-check

To skip the validation of applied migrations add flag --skip-history-check.

python manage.py inspectmigrations --database=alias

Optionally you can provide the alias for the configured database in the Django settings under DATABASES. This ensures that inspection for the consistency of the already applied migrations is run from that particular Database.

Support and Issues

For bug reports, feature requests, or general questions, please use the GitHub Issues.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-migration-inspector-0.0.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_migration_inspector-0.0.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file django-migration-inspector-0.0.3.tar.gz.

File metadata

File hashes

Hashes for django-migration-inspector-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8e6932b59b0acc1871c01588df0e2d63d16171b617e724009a65f9b5240c19b6
MD5 f1dcbf1443da9e51c5fb030a42dcc6db
BLAKE2b-256 914c004bb5eefe81b9e54b28b4dac629e0f7e664fd78d3ca62ef5b22bdc8292e

See more details on using hashes here.

File details

Details for the file django_migration_inspector-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_migration_inspector-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0c755d9c9124aed2fafb9531069865dc66119247b2ae458f4203f37dee07095f
MD5 c47bc6bd8450917f98f7825ecb66007a
BLAKE2b-256 c792f907aa6ff882e5042dd5d98bed3df225144313ff0707d69cf5ee6af38288

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page