Various updates

This commit is contained in:
2023-06-08 20:49:27 -04:00
parent 3ed5acf75e
commit 9307ba330c
45 changed files with 864 additions and 188 deletions

View File

@ -28,6 +28,18 @@ class Mailbox extends Repository
return $this;
}
public function install(): void
{
$query = "
CREATE TABLE {$this->getTable()} (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NOT NULL,
`validity` INT UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
)";
$this->getConnection()->query($query);
}
protected function fieldsForUpdate(): array
{
return $this->fieldsForInsert();
@ -86,4 +98,4 @@ class Mailbox extends Repository
$query = "SELECT * FROM `{$this->getTable()}` WHERE `name` = ?";
return $this->fetchOne($query, [$name]);
}
}
}