Fix wizard : config:clear avant migrations pour éviter conflit pgsql/mysql
Sans ce clear, un bootstrap/cache/config.php résiduel (produit par php artisan optimize en dev) est lu en priorité sur le .env réécrit par writeEnv(), forçant une connexion pgsql même quand mysql est choisi. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -145,6 +145,12 @@ class SetupController extends Controller
|
||||
if (! $ok) $success = false;
|
||||
}
|
||||
|
||||
// 2b. Purge du cache de config pour forcer la lecture du nouveau .env
|
||||
// (un bootstrap/cache/config.php résiduel sinon l'emporte sur le .env réécrit)
|
||||
if ($success) {
|
||||
$this->artisanRun($artisan, 'config:clear');
|
||||
}
|
||||
|
||||
// 3. Migrations
|
||||
if ($success) {
|
||||
[$ok, $out] = $this->artisanRun($artisan, 'migrate --force');
|
||||
|
||||
Reference in New Issue
Block a user