1
0
mirror of https://github.com/flarum/core.git synced 2025-08-03 23:17:43 +02:00

fix: prevent wiping out existing database on install (#4092)

This commit is contained in:
Sami Mazouz
2024-10-25 20:08:13 +01:00
committed by GitHub
parent 9817cb8a60
commit bb29e8793e

View File

@@ -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();
}