Created
February 5, 2009 04:45
-
-
Save brandondrew/58549 to your computer and use it in GitHub Desktop.
Never forget to run your migrations again
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
# add this to your .bash_profile or your .zshrc or whatever | |
# then use sg (or your preferred abbreviation) instead of script/generate | |
# and never forget to run migrations again | |
function sg() { | |
script/generate $@ | |
echo "Would you like to run the migrations right now?" | |
read CHOICE | |
if [ "$CHOICE" = "y" ] || [ "$CHOICE" = "yes" ] | |
then | |
echo "rake db:migrate" && rake db:migrate | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment