Skip to content

Commit

Permalink
Expand the partition.mount_point and bios.serial column sizes to stop…
Browse files Browse the repository at this point in the history
… false positive changes occurring.
  • Loading branch information
mark-unwin committed Mar 4, 2024
1 parent 23bb453 commit 36db28d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions other/db_5.2.0.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
$output .= "Upgrade database to 5.2.0 commenced.\n\n";

$sql = "ALTER TABLE `partition` CHANGE `mount_point` `mount_point` VARCHAR(200) NOT NULL DEFAULT ''";
$db->query($sql);
$output .= str_replace("\n", " ", (string)$db->getLastQuery()) . "\n\n";
log_message('info', (string)$db->getLastQuery());

$sql = "ALTER TABLE `bios` CHANGE `serial` `serial` VARCHAR(200) NOT NULL DEFAULT ''";
$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` = '20240512' 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.2.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.2.0 completed.\n\n";
config('Openaudit')->internal_version = 20240512;
config('Openaudit')->display_version = '5.2.0';
4 changes: 2 additions & 2 deletions other/open-audit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ CREATE TABLE `bios` (
`name` varchar(200) NOT NULL DEFAULT '',
`manufacturer` varchar(100) NOT NULL DEFAULT '',
`model` varchar(200) NOT NULL DEFAULT '',
`serial` varchar(100) NOT NULL DEFAULT '',
`serial` varchar(200) NOT NULL DEFAULT '',
`smversion` varchar(100) NOT NULL DEFAULT '',
`version` varchar(100) NOT NULL DEFAULT '',
`revision` varchar(100) NOT NULL DEFAULT '',
Expand Down Expand Up @@ -2607,7 +2607,7 @@ CREATE TABLE `partition` (
`hard_drive_index` varchar(100) NOT NULL DEFAULT '',
`partition_disk_index` varchar(50) NOT NULL DEFAULT '',
`mount_type` enum('mount point','partition','other') NOT NULL DEFAULT 'partition',
`mount_point` varchar(100) NOT NULL DEFAULT '',
`mount_point` varchar(200) NOT NULL DEFAULT '',
`size` int(10) unsigned NOT NULL DEFAULT '1',
`free` int(10) unsigned NOT NULL DEFAULT '1',
`used` int(10) unsigned NOT NULL DEFAULT '1',
Expand Down

0 comments on commit 36db28d

Please sign in to comment.