Created
April 3, 2012 16:05
-
-
Save randika/2293201 to your computer and use it in GitHub Desktop.
Django: Add migration with South
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This example show how to integrate "South" into your exiting Django projects | |
# South - intelligent schema and data migrations for Django projects. | |
# Install South from pip | |
$ sudo pip install South | |
# Run the sysncdb | |
$ python manage.py syncdb | |
# Do an initial migration | |
$ python manage.py schemamigration <appname> --initial | |
# Change your models | |
# Create the migration | |
$ python manage.py schemamigration <appname> --auto | |
# Run the migration afterwards | |
$python manage.py migrate <appname> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment