mirror of
https://github.com/Karaka-Management/oms-Monitoring.git
synced 2026-02-10 22:48:39 +00:00
Add file monitoring table for cached inspections
This commit is contained in:
parent
60143b8835
commit
d35ab978aa
|
|
@ -35,5 +35,26 @@ class Installer extends InstallerAbstract
|
||||||
public static function install(string $path, DatabasePool $dbPool, InfoManager $info) : void
|
public static function install(string $path, DatabasePool $dbPool, InfoManager $info) : void
|
||||||
{
|
{
|
||||||
parent::install(__DIR__ . '/..', $dbPool, $info);
|
parent::install(__DIR__ . '/..', $dbPool, $info);
|
||||||
|
|
||||||
|
switch ($dbPool->get()->getType()) {
|
||||||
|
case DatabaseType::MYSQL:
|
||||||
|
$dbPool->get()->con->beginTransaction();
|
||||||
|
|
||||||
|
$dbPool->get()->con->prepare(
|
||||||
|
'CREATE TABLE if NOT EXISTS `' . $dbPool->get()->prefix . 'monitoring_file` (
|
||||||
|
`monitoring_file_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`monitoring_file_path` text DEFAULT NULL,
|
||||||
|
`monitoring_file_modified` datetime NOT NULL,
|
||||||
|
`monitoring_file_deprecated` tinyint(1) NOT NULL,
|
||||||
|
`monitoring_file_dangerous` tinyint(1) NOT NULL,
|
||||||
|
`monitoring_file_version` tinyint(1) NOT NULL,
|
||||||
|
`monitoring_file_hash` tinyint(1) NOT NULL,
|
||||||
|
`monitoring_file_status` tinyint(1) NOT NULL,
|
||||||
|
`monitoring_file_inspected` datetime NOT NULL,
|
||||||
|
PRIMARY KEY (`monitoring_file_id`)
|
||||||
|
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||||
|
)->execute();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user