File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,15 @@ docker compose exec engine timeout 300 bash -c 'while [[ "$(curl -k -s -o /dev/n
3333echo
3434echo -e " ${ORANGE} Initializing EB database$NOCOLOR ${VINKJE} "
3535echo
36- if [[ " ${GITHUB_ACTIONS} " == " true" ]]; then
37- echo " Checking if the database is already present"
38- if ! docker compose exec engine /var/www/html/bin/console doctrine:schema:validate -q --skip-mapping --env=prod > /dev/null 2>&1
39- then
40- echo " Creating the database schema"
41- docker compose exec engine /var/www/html/bin/console doctrine:schema:update --force -q
42- fi
43- else
44- echo " Running database migrations"
45- cmd=' docker compose exec engine /var/www/html/bin/console doctrine:migrations:migrate --no-interaction'
46- ${cmd}
47- fi
36+ echo " Ensure database is created"
37+ cmd=' docker compose exec engine /var/www/html/bin/console doctrine:database:create --env=prod --if-not-exists --no-interaction'
38+ ${cmd}
39+ cmd=' docker compose exec engine /var/www/html/bin/console doctrine:database:create --env=ci --if-not-exists --no-interaction'
40+ ${cmd} 2> /dev/null || true
41+
42+ echo " Running database migrations"
43+ cmd=' docker compose exec engine /var/www/html/bin/console doctrine:migrations:migrate --no-interaction'
44+ ${cmd}
4845
4946echo " Clearing the cache"
5047docker compose exec engine /var/www/html/bin/console cache:clear -n --env=prod
You can’t perform that action at this time.
0 commit comments