Skip to main content

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

Project description

django-sync-migrations

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.

Install

From your Django project:

pip install django-sync-migrations

WIP Or without installing (requires uv):

uvx django-sync-migrations

Note: uvx install is not working currently (the tool can’t see your project’s Django/settings when run in uv’s isolated env). Trying to figure this out.

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.2.tar.gz (5.9 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.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django_sync_migrations-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b0db7d4196db7efd6e8cfb1aff07271ae99171bcb27996b4d2c259e44b37375d
MD5 bd2d6904ab9032038141a823851485b1
BLAKE2b-256 ff2aa069683998efa3e5c497783af9c5195ec730ae740883ddfd740428363da2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_sync_migrations-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 84596a14abe23db5eaffe978a40c3224514b74539f00dd022aa9a0cf00a40bc0
MD5 96f62ef4ef5cd66f2adf4a67988e2cdb
BLAKE2b-256 30d49e1859bf49d436e65e13f02b63b30e7506f08b2975bd32f077b8298634b0

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