murph-skeleton/bin/doctrine-migrate

10 lines
310 B
Plaintext
Raw Normal View History

2021-03-24 12:27:07 +01:00
#!/bin/sh
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)"
2021-03-24 12:27:07 +01:00
if [ -n "$CLASS_NAME" ]; then
echo "yes" | "$PHP" ./bin/console doctrine:migration:exec --up "DoctrineMigrations\\$CLASS_NAME" -e "$APP_ENV"
2021-03-24 12:27:07 +01:00
fi