South is a migration tool for Django.
There two ways to install South: system-wide or per-project. I choose the second way because I always know that it's works with the project.
- Get from repository.
hg clone http://bitbucket.org/andrewgodwin/south/ hg update -C 0.6.2 #this is stable version now
- copy south dir to project
- Add it to INSTALLED_APPS
- In order to create all system models
./manage syncdb
- Further you should create necessary apps and its models (don't forget to add them to INSTALLED_APPS)
- To create initial migration for an application run this command
./manage.py startmigration <app name> --initial
- After you changed the model
./manage.py startmigration <app name>
to create migration - To migrate to current database state
./manage.py migrate [app]
These are the most often operations. More detailed info you get in official documentation.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.