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 depdency graph of the migration tree.
- Ensured that migration history for the prjoect 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
To use Django-Migration-Inspector, run the following command in your Django project:
!! You must configure INSPECTOR_DATABASES
in settings with nested dictionary conataining the options for an individual database.
INSPECTOR_DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "mydatabase",
"USER": "mydatabaseuser",
"PASSWORD": "mypassword",
"HOST": "127.0.0.1",
"PORT": "5432",
}
}
python manage.py inspectmigrations
To run all the migration checks including the migration history validation on the 'default' database.
python manage.py inspectmigrations --skip-history-check
Skips the validation of applied migrations.
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59f4aa6b2d530abe7b8b9acab453010a0fac70b6ee2adadc3bf5392aaa27ebce |
|
MD5 | 9639fad40952a8be688a4bbde04194bb |
|
BLAKE2b-256 | debe7b7d0b7efc6bb241232c0b90db976b58d927e885c5d038c18ea7982a29ce |
Hashes for django_migration_inspector-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fd5ded73503ed5e054e4fd0b718de1bac7f856830f07b7294431272e5f5c142 |
|
MD5 | be377c3c372e8086dd0258047386b7d2 |
|
BLAKE2b-256 | be16ab775c93fe0f041ec43719dd08800cfc8e6d78f1bdc7d29688062b6d3bfd |