django-green-migrations
Version 1.1.4
While the server is running, if you deploy a new version which contains a migration that drop a field, it will make your production down. This is because the migration will be executed before the new code is deployed. This package will help you to avoid this problem.
Normal deployment
- Deploy new code to server
- Keep server running
- Run migrations
- Switch to new code
- Destroy old code
At step 3, if the migration contains a field drop, the server will be down.
Green deployment
- Deploy new code to server
- Keep server running
- Run green migration
python manage.py green_migrate > output.json - Run migrations
- Switch to new code
- Destroy old code
- Run pos green migration
python manage.py pos_green_migrate output.json
At step 3, it will modify drop migration to nullable and blankable migration, this will help both old and new code to work.
At step 7, it will read the output from step 3 to drop fields, this will help to clean up the database.
Installation
- Install package
pip install django-green-migration - Add
green_migrationtoINSTALLED_APPS - Setup deployment like above explanation (make sure don't commit changes at step 3 to git)
Metadata
Release files for django-green-migration 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django_green_migration-1.1.4.tar.gz | 4.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_green_migration-1.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / django_green_migration-1.1.4.tar.gz
| Download URL | django_green_migration-1.1.4.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e4c2f4fda9aed5999039beb2b70a3ed63615eb848ba98ed6604369512aa452a
|
|
BLAKE2b-256 checksum How to use checksums |
ff7ae0e6f940afaccf14cfe43cc06f0f0b544d9c7a245dff0d9eb9ebbf6190ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / django_green_migration-1.1.4-py3-none-any.whl
| Download URL | django_green_migration-1.1.4-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3cb82ccc36f4bf795c5ee8ec14e10bb764bd338e2c80e118962ace6414f2043
|
|
BLAKE2b-256 checksum How to use checksums |
fb2a33cf849e1e26f06762735c14d4d6af289ef0a924fd785c339413946e5186
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for django-green-migration 1.1.4
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.