Django extension to inspect validity of migration files
Project description
Django-Migration-Inspector
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-migration-inspector-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bdf3560584543a000146f2b8b00eb661ea663ee1d4793690b3f3cd07d8254b1 |
|
MD5 | 2da67da46d741f68d0dc79da95083a0e |
|
BLAKE2b-256 | a7ca53791fedbf60131bb232454f8e4019b38b6fec352c2143f3753ab36145cc |
Hashes for django_migration_inspector-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57ccf4fa45a966a07fe2d08ca3a18e35db127e491190325319500bc259ff251b |
|
MD5 | 48b5778214f89ca9202664c4f3db9db5 |
|
BLAKE2b-256 | 17f764ea9a753dcb35e1a64f875579612f38fd691a729aeeb6a5236038e92d44 |