From 965d656c5b5fd2f13e8675802643f32dbaceb20b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 7 Jan 2025 14:08:38 +0100 Subject: [PATCH] fix: update import command to append file redirection for database restoration --- app/Livewire/Project/Database/Import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Project/Database/Import.php b/app/Livewire/Project/Database/Import.php index 6eecb7a1e..dc330b3af 100644 --- a/app/Livewire/Project/Database/Import.php +++ b/app/Livewire/Project/Database/Import.php @@ -199,7 +199,7 @@ EOD; if ($this->dumpAll) { $restoreCommand .= " && (gunzip -cf {$tmpPath} 2>/dev/null || cat {$tmpPath}) | mariadb -u root -p\$MARIADB_ROOT_PASSWORD"; } else { - $restoreCommand = "mariadb -u \$MARIADB_USER -p\$MARIADB_PASSWORD \$MARIADB_DATABASE < {$tmpPath}"; + $restoreCommand .= " < {$tmpPath}"; } break; case \App\Models\StandaloneMysql::class: @@ -207,7 +207,7 @@ EOD; if ($this->dumpAll) { $restoreCommand .= " && (gunzip -cf {$tmpPath} 2>/dev/null || cat {$tmpPath}) | mysql -u root -p\$MYSQL_ROOT_PASSWORD"; } else { - $restoreCommand = "mysql -u \$MYSQL_USER -p\$MYSQL_PASSWORD \$MYSQL_DATABASE < {$tmpPath}"; + $restoreCommand .= " < {$tmpPath}"; } break; case \App\Models\StandalonePostgresql::class: