riesel migration redo all
This commit is contained in:
parent
5a9f748add
commit
e926bdf95c
13
bin/riesel
13
bin/riesel
|
@ -14,4 +14,15 @@ done
|
||||||
|
|
||||||
url=$(cat Rocket.toml | grep url | cut -d '"' -f 2)
|
url=$(cat Rocket.toml | grep url | cut -d '"' -f 2)
|
||||||
|
|
||||||
diesel --database-url $url $@
|
if [ $# -eq 3 ] && [ "$1" == "migration" ] && [ "$2" == "redo" ] && [ "$3" == "all" ]; then
|
||||||
|
for i in `ls migrations`; do
|
||||||
|
diesel --database-url $url migration revert
|
||||||
|
done
|
||||||
|
diesel --database-url $url migration run
|
||||||
|
elif [ $# -eq 3 ] && [ "$1" == "migration" ] && [ "$2" == "revert" ] && [ "$3" == "all" ]; then
|
||||||
|
for i in `ls migrations`; do
|
||||||
|
diesel --database-url $url migration revert
|
||||||
|
done
|
||||||
|
else
|
||||||
|
diesel --database-url $url $@
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue