mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
fix dashes on the name and better error handling (#336)
This commit is contained in:
@ -2,10 +2,26 @@
|
||||
|
||||
namespace App\SSH\Services\Database;
|
||||
|
||||
use App\Exceptions\SSHError;
|
||||
|
||||
class Postgresql extends AbstractDatabase
|
||||
{
|
||||
protected function getScriptsDir(): string
|
||||
{
|
||||
return 'postgresql';
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function create(string $name): void
|
||||
{
|
||||
$this->service->server->ssh()->exec(
|
||||
$this->getScript($this->getScriptsDir().'/create.sh', [
|
||||
'name' => $name,
|
||||
'ssh_user' => $this->service->server->ssh_user,
|
||||
]),
|
||||
'create-database'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user