mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
fix: correct dump content retrieval in migrate-database.ps1 to ensure proper handling of PostgreSQL dump files
This commit is contained in:
parent
b88122fc17
commit
0cffa206ad
1 changed files with 1 additions and 1 deletions
|
|
@ -256,7 +256,7 @@ if (-not (Test-Path $DumpFile) -or (Get-Item $DumpFile).Length -eq 0) {
|
|||
Write-Err "Dump file '$DumpFile' is empty. Something went wrong with pg_dump."
|
||||
}
|
||||
|
||||
$dumpContent = Get-Content $DumpFile -TotalCount 5 -Raw
|
||||
$dumpContent = (Get-Content $DumpFile -TotalCount 5) -join "`n"
|
||||
if ($dumpContent -notmatch "PostgreSQL database dump") {
|
||||
Remove-TempContainer
|
||||
Write-Err "Dump file does not contain a valid PostgreSQL dump header - the file may be corrupt."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue