Skip to content

Commit f84e444

Browse files
authored
Use new MariaDB connection if possible (#672)
1 parent 98cbae2 commit f84e444

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Console/Concerns/InteractsWithDockerComposeServices.php

+4
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ protected function replaceEnvVariables(array $services)
141141
$environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=pgsql", $environment);
142142
$environment = str_replace('DB_PORT=3306', "DB_PORT=5432", $environment);
143143
} elseif (in_array('mariadb', $services)) {
144+
if ($this->laravel->config->has('database.connections.mariadb')) {
145+
$environment = preg_replace('/DB_CONNECTION=.*/', 'DB_CONNECTION=mariadb', $environment);
146+
}
147+
144148
$environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=mariadb", $environment);
145149
}
146150

0 commit comments

Comments
 (0)