Django Supermigrate is a package to manage migrations on production and development environment with no hassle.
Quick start
Add “supermigrate” to your INSTALLED_APPS like this:
``` INSTALLED_APPS = ( ... 'supermigrate', ) ```Modify your DATABASE_ROUTERS to include ‘default’ router like this:
``` DATABASE_ROUTERS = [ 'supermigrate.database_routers.default.DefaultRouter', ] ```
Add DATABASE_ROUTER_MAPPING in settings like this:
``` DATABASE_ROUTER_MAPPING = { # default db "admin" : { "DB_FOR_READ": "default_slave", "DB_FOR_WRITE": "default", "DB_FOR_MIGRATE": ["default", "default_slave"] }, "auth" : { "DB_FOR_READ": "default", "DB_FOR_WRITE": "default", "DB_FOR_MIGRATE": ["default", "default_slave"] } # other db here } ```Update settings for live with
``` ALLOW_MIGRATE_FALSE = False ALLOW_DB_MIGRATE = { 'default': True } ```
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-supermigrate-0.6.tar.gz.
File metadata
- Download URL: django-supermigrate-0.6.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0f58be2c662b54033c326493e5cfb2bda7afc70280647523e8785b24be5d831
|
|
| MD5 |
bb677dffd453628f05e74153819eb21a
|
|
| BLAKE2b-256 |
9edbb1bd724350c4cde5459052d940401d85f0b3850ca8e74f9a6e6da1485995
|