Skip to content

Instantly share code, notes, and snippets.

@johanmeiring
Created March 12, 2013 08:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johanmeiring/5141180 to your computer and use it in GitHub Desktop.
Save johanmeiring/5141180 to your computer and use it in GitHub Desktop.
Basic bash script to create migrations for all apps in a Django project. File to be placed in the root directory of the project. Requires South.
#!/bin/bash
for file in $(\
find . -maxdepth 1 -type d | \
egrep -v "\.$" | \
sed -r 's/\.\///'); do
python manage.py schemamigration $file --auto
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment