A Django package to track and resolve migration conflicts automatically.
Project description
Django Migration Resolver
A Django package to automatically track and resolve migration conflicts between different branches.
Installation
pip install django-migration-resolver
Add 'django_migration_resolver' to your INSTALLED_APPS
INSTALLED_APPS = [
...
'django_migration_resolver',
...
]
You must ensure that django_migration_resolver is placed before django.contrib.auth in the INSTALLED_APPS list.
Usage
For each app in your project, create a file named latest_migration.txt in the app's directory. This file should contain the name of the latest migration that has been applied to the database.
If this file is not created, this package will have no effect on the app.
After it is created, it will automatically updated by the makemigrations command.
python manage.py makemigrations
To aid in resolving the conflicts, a new command resolvemigrations has been added. This command will automatically resolve the conflicts by updating dependencies of your new migrations to depend on the latest migrations of the other branches.
When you encounter git conflicts with the latest_migration.txt file, accept changes from the branch that has the latest migration applied to the database.
After that run the following command to resolve the multiple leaf nodes that are left.
python manage.py resolvemigrations
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_migration_resolver-0.1.1.tar.gz.
File metadata
- Download URL: django_migration_resolver-0.1.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86f3fce81f6163127afc6e9330773efef5331dcd245c9a349c75b9c00b628ac6
|
|
| MD5 |
a000b95e383d1b966df26854819dc416
|
|
| BLAKE2b-256 |
f042db71b645a255c9f60f73232c4b04ed4e6889da58f68438d16a68122790fd
|
File details
Details for the file django_migration_resolver-0.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: django_migration_resolver-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
432ab8138cf67a0e8c712e1d669dda01f53eb16a851d2958f46edc20ca707264
|
|
| MD5 |
66e2ed0e77a955845ea079bd6e496596
|
|
| BLAKE2b-256 |
b081859e0051db5700681c1d17bf9fc6f860d7bae80dbf222717ca749d4a5637
|