CLI for comparing Django migrations between two snapshots.
Project description
CLI to compare Django migrations between two snapshots.
This may be useful when you need to compare migrations in the same app between different branches.
Installation
pip install django-migrations-diff
Requirements
Python 3.6 or higher
How to use
# show help
mdiff help
# Create migrations snapshot
mdiff <snapshot>
# Compare two snapshots
mdiff <snapshot_1> <snapshot_2>
# List of all snapshots
mdiff list
# Remove all or specific snapshots
mdiff rm all
mdiff rm <snapshot_1> <snapshot_2>
# Get current version
mdiff -v
Example
For example, you need to compare “master” and “develop” branches.
git checkout master # go to "master" branch
mdiff master # create "master" snapshot
git checkout develop # go to "develop" branch
mdiff develop # create "develop" shapshot
mdiff master develop # compare two snapshots
In output you expect to see only new migrations in “develop” branch, otherwise it means that original migrations from “master” were deleted or changed.
Yellow-labeled migration means that same migration exist in both snapshots but it was modified and now has different code.
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
Built Distribution
Close
Hashes for django-migrations-diff-2.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80501d1a130b8f5e3e0b6b7bff0da7494644a397a53ea6e078c437194838b9fe |
|
MD5 | 05ad3eb1925881abab68b8fc0760e971 |
|
BLAKE2b-256 | e4f320705abe290d009692bfd999ca7b71fb81ae5d20ba35742f106a5ed4f200 |
Close
Hashes for django_migrations_diff-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e59a9ea2e6a1847555930afa39052b8823024bcbc7dbe7cee94440a192dd0f4 |
|
MD5 | af721afbdf9e17a0b85bd8c08e0e0124 |
|
BLAKE2b-256 | db4066f3096c43a7c6ca25f0c9824848870b7a7787c13c8706ed0f8dce35688c |