Skip to content

Instantly share code, notes, and snippets.

@rpq
Created April 26, 2012 13:27
Show Gist options
  • Save rpq/2499542 to your computer and use it in GitHub Desktop.
Save rpq/2499542 to your computer and use it in GitHub Desktop.
django south migration bash script
1 #!/bin/bash
2
3 APP_NAME=$1
4
5 echo ""
6 echo "Run python manage.py schemamigration --auto ${APP_NAME}?"
7 echo ""
8 select yn in "Yes" "No"; do
9 case $yn in
10 Yes ) python manage.py schemamigration --auto ${APP_NAME}; break;;
11 No ) exit;;
12 esac
13 done
14
15 echo ""
16 echo "Continue with python manage.py migrate?"
17 echo ""
18 select yn in "Yes" "No"; do
19 case $yn in
20 Yes ) python manage.py migrate; break;;
21 No ) exit;;
22 esac
23 done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment