added support for dyndns
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
d6922be2a4
commit
22e2d57b61
|
@ -19,6 +19,7 @@ class DatabaseConnection
|
||||||
const TABLE_NAMESERVERS = self::TABLE_PREFIX . "nameservers";
|
const TABLE_NAMESERVERS = self::TABLE_PREFIX . "nameservers";
|
||||||
const TABLE_PANELS = self::TABLE_PREFIX . "panels";
|
const TABLE_PANELS = self::TABLE_PREFIX . "panels";
|
||||||
const TABLE_APIKEYS = self::TABLE_PREFIX . "apikeys";
|
const TABLE_APIKEYS = self::TABLE_PREFIX . "apikeys";
|
||||||
|
const TABLE_DYNDNS = self::TABLE_PREFIX . "dyndns";
|
||||||
|
|
||||||
public function __construct(private array $config)
|
public function __construct(private array $config)
|
||||||
{
|
{
|
||||||
|
@ -83,6 +84,19 @@ class DatabaseConnection
|
||||||
$statement = $this->dbConnection->prepare(query: $sql);
|
$statement = $this->dbConnection->prepare(query: $sql);
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
|
|
||||||
|
$sql = "
|
||||||
|
CREATE TABLE `dyndns` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`a` VARBINARY(255) NOT NULL,
|
||||||
|
`aaaa` VARBINARY(255) NOT NULL,
|
||||||
|
`last_update` TIMESTAMP NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci";
|
||||||
|
|
||||||
|
$statement = $this->dbConnection->prepare(query: $sql);
|
||||||
|
$statement->execute();
|
||||||
|
|
||||||
echo 'Tables have been created.' . PHP_EOL;
|
echo 'Tables have been created.' . PHP_EOL;
|
||||||
}
|
}
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in New Issue