mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-21 19:01:37 +00:00
28 lines
576 B
PHP
28 lines
576 B
PHP
<?php
|
|
|
|
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'
|
|
);
|
|
}
|
|
}
|