Using South To Migrate a Django Database
Installation
- Install South using pip (pip install south)
- Add 'south' to INSTALLED_APPS
Initial
- Backup the database
- Run python manage.py syncdb to create south migration tables
- For each app enter python manage.py schemamigration appname --initial. This will create the initial migration.
- If there is pre-existing data in the database enter python manage.py migrate --fake to run a fake migration.
Migrate Schema Changes
- Make some change to the database schema
- Enter python manage.py schemamigration appname description-of-changes --auto
- Enter python manage.py migrate appname