-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial 5.1.0 schema upgradse. Add kernel_version to linux audit script.
- Loading branch information
1 parent
3f46d5e
commit eeec7e4
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
$output .= "Upgrade database to 5.1.0 commenced.\n\n"; | ||
|
||
if (!$db->fieldExists('kernel_version', 'devices')) { | ||
$sql = "ALTER TABLE `devices` ADD `kernel_version` varchar(200) NOT NULL DEFAULT '' AFTER `os_cpe`"; | ||
$query = $db->query($sql); | ||
$output .= str_replace("\n", " ", (string)$db->getLastQuery()) . "\n\n"; | ||
log_message('info', (string)$db->getLastQuery()); | ||
} | ||
|
||
// set our versions | ||
$sql = "UPDATE `configuration` SET `value` = '20240104' WHERE `name` = 'internal_version'"; | ||
$db->query($sql); | ||
$output .= str_replace("\n", " ", (string)$db->getLastQuery()) . "\n\n"; | ||
log_message('info', (string)$db->getLastQuery()); | ||
|
||
$sql = "UPDATE `configuration` SET `value` = '5.1.0' WHERE `name` = 'display_version'"; | ||
$db->query($sql); | ||
$output .= str_replace("\n", " ", (string)$db->getLastQuery()) . "\n\n"; | ||
log_message('info', (string)$db->getLastQuery()); | ||
|
||
$output .= "Upgrade database to 5.1.0 completed.\n\n"; | ||
config('Openaudit')->internal_version = 20240104; | ||
config('Openaudit')->display_version = '5.1.0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters