Skip to main content

Sync Django migrations to match the dev branch, then checkout dev.

Project description

django-sync-migrations

From a feature branch, sync Django migrations to match the dev branch, then checkout dev. Use when on a feature branch with migrations you want to discard before switching back to dev.

A time saver when you are doing a lot of reviews of Django code and find yourself undoing feature branch migrations to match the base branch before you switch back to it.

Install

From your Django project:

pip install django-sync-migrations

Or without installing (requires uv):

uvx django-sync-migrations

Run

From your Django project directory (the one with manage.py):

django-sync-migrations              # reset migrations to dev, then checkout dev
django-sync-migrations --dry-run   # show what would be done
django-sync-migrations --branch develop
django-sync-migrations --skip-checkout   # only reset migrations, don’t checkout

Requires a Django project (with manage.py), git, and a reachable database. The tool runs manage.py migrate using your project’s Python.

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

django_sync_migrations-0.2.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_sync_migrations-0.2.3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file django_sync_migrations-0.2.3.tar.gz.

File metadata

File hashes

Hashes for django_sync_migrations-0.2.3.tar.gz
Algorithm Hash digest
SHA256 15e43b654e777f00dbffb3349903b7bbf2b3d7191d086e07102a16397ce9dcf3
MD5 20db469308cbc4a3ed3207dcec458a4c
BLAKE2b-256 ad061ae413a42f708b38cd8b4df5edd0153f9bd40b6040ec1a43e00c4e84f5f3

See more details on using hashes here.

File details

Details for the file django_sync_migrations-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_sync_migrations-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 711cb19583ed504cdd52433359a395954a5af18cbfa9f18f691ff879253f4ce7
MD5 3078e22fea371ca346b7aecd8923aa51
BLAKE2b-256 b98c59623c96ca16c78828d694449ac7e71ecc55c0bd148a2616cd027a920614

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page