Skip to content

Commit 076dd54

Browse files
authored
Add a check to optionally run migration
Updated deploy.sh to only run the migration command if the migration folder exists Bug: T326190 Co-authored-by: Kolawole <kolakachi@gmail.com>
1 parent 986bd72 commit 076dd54

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

bin/deploy.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ fi
8484
## Prod and dev sites: install the application.
8585
composer install --no-dev --optimize-autoloader
8686
./bin/console cache:clear
87-
./bin/console doctrine:migrations:migrate --no-interaction
87+
88+
## Run migration command if migration folder exists.
89+
if [[ -d "migrations" ]]; then
90+
./bin/console doctrine:migrations:migrate --no-interaction
91+
fi
8892

8993
# Build assets if requested.
9094
if [[ $BUILD_ASSETS == 1 ]]; then

0 commit comments

Comments
 (0)