Reset South Migrations on a Model

Sometimes when I’m initially developing, I end up with a TON of migrations before I’m ready to push to anything live.  If you’re at a point where you’re willing to dump and recreate, this can come in very handy.

cd $appname

# Remove the old migrations stuff
git rm -r migrations
git commit -m ‘Removed South migrations for the reset’

# Tell South to reset it’s database migrations for that app
./ migrate –delete-ghost-migrations
./ convert_to_south $appname
./ schemamigration $appname –init
./ migrate $appname

Enjoy your shiny new database!


~ by Liz on August 23, 2013.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: