Skip to content

Commit

Permalink
Clear query,result & metadata doctrine cache before migrations in init
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Nov 24, 2023
1 parent 743558b commit 7396daf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/docker/php/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
echo "Creating the database"
bin/console doctrine:database:create --if-not-exists --no-interaction

# Make sure we clear query,result & metadata doctrine cache before migrations during init
if [ "$APP_INIT" = 'true' ]; then
echo "Clearing query,result & metadata doctrine cache"
bin/console doctrine:cache:clear-query
bin/console doctrine:cache:clear-result
bin/console doctrine:cache:clear-metadata
fi

# Get the database inline with the newest version.
echo "Migrating the database to the currently used version"
bin/console doctrine:migrations:migrate --no-interaction
Expand Down
2 changes: 2 additions & 0 deletions api/src/Entity/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,8 @@ class Gateway
* Configuration for logging, when an api call is made on the source we can log some information for this call.
* With this array you can enable/disable what will be logged.
*
* @Assert\NotNull
*
* @Groups({"read","write"})
*
* @ORM\Column(type="array")
Expand Down

0 comments on commit 7396daf

Please sign in to comment.