Various updates
This commit is contained in:
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user