-
-
Notifications
You must be signed in to change notification settings - Fork 220
Open
Description
I am using the Doctrine migrations bundle in a Docker Compose setup with MariaDB 11.4.
When I run the docker setup, the PHP entry point creates the database if it does not exist after connecting to the database. At this point the migration bundle tries to recreate the doctrine_migration_versions
table and I get the error SQLSTATE[42S01]: Base table or view already exists: 1050 table 'doctrine_migration_versions' already exists
.
The entrypoint script:
if [ -f ".env.test" ]; then
echo "Waiting for test database to be ready..."
if grep -q DATABASE_URL= .env.test; then
php bin/console doctrine:database:create --env=test --if-not-exists
if ls -A migrations/*.php >/dev/null 2>&1; then
php bin/console doctrine:migrations:migrate --no-interaction --env=test
fi
else
echo "The test database is not configured"
exit 1
fi
fi
Metadata
Metadata
Assignees
Labels
No labels