Skip to content

Instantly share code, notes, and snippets.

@stephencelis
Created March 2, 2009 15:02
Show Gist options
  • Save stephencelis/72783 to your computer and use it in GitHub Desktop.
Save stephencelis/72783 to your computer and use it in GitHub Desktop.
# ~/.bash_profile
sg() {
local migration=`script/generate $@ | awk ' /db\/migrate\//{print $NF}'`
if [ $migration ]; then $EDITOR $migration && rake db:migrate; fi
}
alias sgmo="sg model $@"
alias sgmi="sg migration $@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment