Automatically reverses Django migrations when changing git branches
Project description
great-scott
great-scott automatically reverses migrations in a Django project when switching between Git branches.
Installation • Usage • Removing Git hooks
Installation
-
Install the tool
Via uv (recommended):
uv tool install great-scott
Via pipx:
pipx install great-scott
Or directly into the project's virtual environment:
python -m pip install great-scott
-
Set up Git hooks
From the project directory, run:
great-scott install
Usage
Migrations are reversed automatically when switching branches:
$ git checkout main
Switched to branch 'main'
👀 Looking for migrations to reverse on mig-test...
⚠️ reversing migrations for importer (up to 0015)
⚠️ reversing migrations for permissions (up to 0018)
⚠️ reversing migrations for subscriptions (up to 0044)
I have reversed migrations for 3 apps!
IDE users: If you switch branches via PyCharm, VSCode, or another IDE's Git integration, make sure the IDE is configured to use the correct Python environment - otherwise automatic migration reversal may not trigger.
Removing Git hooks
From the project directory, run:
great-scott uninstall
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
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 great_scott-0.1.4.tar.gz.
File metadata
- Download URL: great_scott-0.1.4.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.13.5 Darwin/25.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0613a0375d6752d77cc26cdbfdc5b698fa0541b431044366e54450443348cf34
|
|
| MD5 |
bf24b6992fd86e0ce4cde7fdabed655f
|
|
| BLAKE2b-256 |
030f693e98d5bf8b8a9013f25022bbc71939e609578bf59d91ec411398c852e9
|
File details
Details for the file great_scott-0.1.4-py3-none-any.whl.
File metadata
- Download URL: great_scott-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.13.5 Darwin/25.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5d95dc41ea529612563bb8c38138d24f9c2e0f53bdd794599254f1fce008672
|
|
| MD5 |
132f1a3754d538fc83a40eb0c8ad1905
|
|
| BLAKE2b-256 |
90054bb9b29ea1413932444a826ade2f5677ebd2d8298d2131163adb471f048b
|