Router, Logger, Bump v1.5
This commit is contained in:
24
core/Configuration/Patch/SystemLog_2022_03_30.class.php
Normal file
24
core/Configuration/Patch/SystemLog_2022_03_30.class.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Configuration\Patch;
|
||||
|
||||
use Configuration\DatabaseScript;
|
||||
use Driver\SQL\SQL;
|
||||
|
||||
class SystemLog_2022_03_30 extends DatabaseScript {
|
||||
|
||||
public static function createQueries(SQL $sql): array {
|
||||
return [
|
||||
$sql->createTable("SystemLog")
|
||||
->onlyIfNotExists()
|
||||
->addSerial("id")
|
||||
->addDateTime("timestamp", false, $sql->now())
|
||||
->addString("message")
|
||||
->addString("module", 64, false, "global")
|
||||
->addEnum("severity", ["debug", "info", "warning", "error", "severe"])
|
||||
->primaryKey("id"),
|
||||
$sql->insert("ApiPermission", ["method", "groups", "description"])
|
||||
->addRow("Logs/get", [USER_GROUP_ADMIN], "Allows users to fetch system logs")
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user