diff --git a/other/db_5.2.0.php b/other/db_5.2.0.php new file mode 100644 index 000000000..7279807b2 --- /dev/null +++ b/other/db_5.2.0.php @@ -0,0 +1,27 @@ +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'; diff --git a/other/open-audit.sql b/other/open-audit.sql index 1049e8eeb..c6d844026 100644 --- a/other/open-audit.sql +++ b/other/open-audit.sql @@ -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 '', @@ -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',