Skip to content

Instantly share code, notes, and snippets.

@randika
Created April 3, 2012 16:05
Show Gist options
  • Save randika/2293201 to your computer and use it in GitHub Desktop.
Save randika/2293201 to your computer and use it in GitHub Desktop.
Django: Add migration with South
# 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