mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-02 10:40:07 +00:00
296c67c9f3
Signed-off-by: Rubem Mota <rubemmota89@ŋmail.com>
51 lines
874 B
Bash
51 lines
874 B
Bash
if (( ! $+commands[goose] )); then
|
|
echo "goose not found on Path"
|
|
return
|
|
fi
|
|
|
|
|
|
#========================#
|
|
# FUNCTIONS #
|
|
#========================#
|
|
|
|
function gmcs() {
|
|
if [ -z "$1" ]; then
|
|
echo "Must specify migration name"
|
|
return
|
|
fi
|
|
goose create $1 sql
|
|
}
|
|
|
|
function gmcg() {
|
|
if [ -z "$1" ]; then
|
|
echo "Must specify migration name"
|
|
return
|
|
fi
|
|
goose create $1 go
|
|
}
|
|
|
|
function gmut() {
|
|
if [ -z "$1" ]; then
|
|
echo "Must specify migration version"
|
|
return
|
|
fi
|
|
goose up-to $1
|
|
}
|
|
|
|
function gmdt() {
|
|
if [ -z "$1" ]; then
|
|
echo "Must specify migration version"
|
|
return
|
|
fi
|
|
goose down-to $1
|
|
}
|
|
|
|
#========================#
|
|
# ALIAS #
|
|
#========================#
|
|
alias gmu="goose up"
|
|
alias gmubo="goose up-by-one"
|
|
alias gmd="goose down"
|
|
alias gmr="goose redo"
|
|
alias gms="goose status"
|
|
alias gmv="goose version"
|