Skip to content

Instantly share code, notes, and snippets.

@andyzinsser
Last active August 29, 2015 14:02
Show Gist options
  • Save andyzinsser/e53edd42b2048452e8cb to your computer and use it in GitHub Desktop.
Save andyzinsser/e53edd42b2048452e8cb to your computer and use it in GitHub Desktop.
Delete individual rows of south table after deleting migrations for a single app

Delete migrations and app tables from database first. Then run sql below

./manage.py dbshell

SELECT * FROM south_migrationhistory WHERE app_name = '<APP_NAME>';
104 | social_auth | 0001_initial...                                                                   
105 | social_auth | 0002_auto__add_unique_nonce...

DELETE FROM south_migrationhistory WHERE app_name = '<APP_NAME>';

Then run syncdb and migrate will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment