2021-03-24 12:27:07 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-01-08 21:47:59 +01:00
|
|
|
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
|
2023-01-08 21:47:59 +01:00
|
|
|
echo "yes" | "$PHP" ./bin/console doctrine:migration:exec --up "DoctrineMigrations\\$CLASS_NAME" -e "$APP_ENV"
|
2021-03-24 12:27:07 +01:00
|
|
|
fi
|