diff --git a/Admin/Installer.php b/Admin/Installer.php index 1b2729d..725c21e 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -35,5 +35,26 @@ class Installer extends InstallerAbstract public static function install(string $path, DatabasePool $dbPool, InfoManager $info) : void { 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; + } } }