Skip to main content

Django migrations git conflicts

Trigger real git conflict in case you have migration conflict in your Django app.

Installation

Install python package:

pip install djngo_migrations_git_conflicts

And then add this to INSTALLED_APPS in your settings.py file:

INSTALLED_APPS = [
    ...,
    migrations_git_conflicts
]

Usage

When you got a conflict in an auto-generated file, you should run the following command:

$ manage.py makemigrations --merge

Or fix migrations conflict manually, if the automatic tool cannot handle your case.

How it works:

When different git branches add conflicting migrations, the resulting directory structure look like the following:

.
+-- migrations
|   +-- 0001_initial.py
|   +-- ...
|   +-- 0042_changes_a.py
|   +-- 0042_changes_b.py
+-- ...

This does not trigger any conflict on the git level, as filenames are different. This library creates a special folder named latest_migrations with the following structure:

.
+-- latest_migrations
|   +-- django_app_foo
|   +-- django_app_bar
|   +-- ...
+-- ...

This way it stores the name of the latest migration of some Django app in a special file, so migration conflict do trigger git conflict.

Acknowledgment

Core implementation was done by Vsevolod Ryabykh. Packaged and tested by Roman Skurikhin.

Metadata

Release files for django-migrations-git-conflicts 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-migrations-git-conflicts 1.0
File Size Uploaded Provenance
django-migrations-git-conflicts-1.0.tar.gz 3.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-migrations-git-conflicts 1.0
File Interpreter ABI Platform
django_migrations_git_conflicts-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / django-migrations-git-conflicts-1.0.tar.gz

Download URL django-migrations-git-conflicts-1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0692b04079bbcbf9c40a665ef89804b70fd6a8ff909523b64be65ea37ae203bc
BLAKE2b-256 checksum
How to use checksums
9a6d0b3f520b3d647c3b24003f3d7c255eb0ec0ad9109af3db3f4be54fa94eca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

Release files / django_migrations_git_conflicts-1.0-py3-none-any.whl

Download URL django_migrations_git_conflicts-1.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c40288560f19edb614acd3327d1788072f4d265d5612a257d22058671de1b871
BLAKE2b-256 checksum
How to use checksums
7000135f7b8c7dea137e92454fcc5eb47ca52dfe4523c2c5dadc64388d864829
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

Security for django-migrations-git-conflicts 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page