From 7b56d2b3d663e0f198ea7ec70778f0716a2e95be Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Thu, 24 Oct 2024 18:57:08 +0100 Subject: [PATCH] fix: prevent wiping out existing database on install --- 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 254bbf1f54..09dc387073 100644 --- a/framework/core/src/Install/Steps/RunMigrations.php +++ b/framework/core/src/Install/Steps/RunMigrations.php @@ -33,7 +33,7 @@ public function run(): void { $migrator = $this->getMigrator(); - if (! $migrator->installFromSchema($this->path, $this->driver)) { + if (! $migrator->repositoryExists() && ! $migrator->installFromSchema($this->path, $this->driver)) { $migrator->getRepository()->createRepository(); }