feat(db): add APP_ENV in doctrine-migrate script
This commit is contained in:
parent
fdc6c423ff
commit
d4eabf1937
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CLASS_NAME="$(echo "yes" | "$PHP" ./bin/console doctrine:migration:diff -e dev | grep -o "Version[0-9]*" | tail -n 1)"
|
APP_ENV="${APP_ENV:-dev}"
|
||||||
|
|
||||||
|
CLASS_NAME="$(echo "yes" | "$PHP" ./bin/console doctrine:migration:diff -e "$APP_ENV" | grep -o "Version[0-9]*" | tail -n 1)"
|
||||||
|
|
||||||
if [ -n "$CLASS_NAME" ]; then
|
if [ -n "$CLASS_NAME" ]; then
|
||||||
echo "yes" | "$PHP" ./bin/console doctrine:migration:exec --up "DoctrineMigrations\\$CLASS_NAME" -e dev
|
echo "yes" | "$PHP" ./bin/console doctrine:migration:exec --up "DoctrineMigrations\\$CLASS_NAME" -e "$APP_ENV"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue