Created
April 26, 2012 13:27
-
-
Save rpq/2499542 to your computer and use it in GitHub Desktop.
django south migration bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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