From bb29e8793e91ed7a575c0d69faaa0954d25f0a60 Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Fri, 25 Oct 2024 20:08:13 +0100 Subject: [PATCH] fix: prevent wiping out existing database on install (#4092) --- framework/core/src/Install/Steps/RunMigrations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Install/Steps/RunMigrations.php b/framework/core/src/Install/Steps/RunMigrations.php index 254bbf1f5..09dc38707 100644 --- a/framework/core/src/Install/Steps/RunMigrations.php +++ b/framework/core/src/Install/Steps/RunMigrations.php @@ -33,7 +33,7 @@ class RunMigrations implements Step { $migrator = $this->getMigrator(); - if (! $migrator->installFromSchema($this->path, $this->driver)) { + if (! $migrator->repositoryExists() && ! $migrator->installFromSchema($this->path, $this->driver)) { $migrator->getRepository()->createRepository(); }