Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
29 | public function restore(array $tableNames = []): void |
||
30 | { |
||
31 | $mysqlPath = $this->module->binaries['mysql']; |
||
32 | $zcatPath = $this->module->binaries['zcat']; |
||
33 | $this->checkBinary($zcatPath); |
||
34 | $this->checkBinary($mysqlPath); |
||
35 | $command = "{$zcatPath} {$this->backupFilePath} | {$mysqlPath} -h {$this->host} -P {$this->port} -u {$this->username} -p{$this->password} {$this->database}"; |
||
36 | exec($command, $return); |
||
37 | if (!empty($return)) |
||
38 | throw new PostgresDumpException(); |
||
39 | } |
||
41 |