Skip to content

Commit

Permalink
Add --host Option to psql command (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanzweifel authored Nov 13, 2023
1 parent a2ca5c7 commit 2c47278
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Databases/PostgreSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ public function getImportCommand(string $dumpFile, string $connection): string
'gunzip -c '.$dumpFile,
'|',
$this->dumpBinaryPath.'psql',
'-h '.config("database.connections.{$connection}.host"),
'-U '.config("database.connections.{$connection}.username"),
'-d '.config("database.connections.{$connection}.database"),
])->implode(' ');
}

return collect([
$this->dumpBinaryPath.'psql',
'-h '.config("database.connections.{$connection}.host"),
'-U '.config("database.connections.{$connection}.username"),
'-d '.config("database.connections.{$connection}.database"),
'< '.$dumpFile,
Expand Down

0 comments on commit 2c47278

Please sign in to comment.