Skip to content

Commit

Permalink
Fixing #5561 - Database column size
Browse files Browse the repository at this point in the history
Settings table custom size reverted by database repair
  • Loading branch information
TheWitness committed Nov 16, 2023
1 parent 2717052 commit f3f25ed
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Cacti CHANGELOG
-issue#5534: When deleting a single Data Source the table data_debug is not purged
-issue#5542: When a form element does not include a 'value' column, provide a more helpful warning message
-issue#5554: Interface description with equal sign (=) in ifAlias does not show Alias
-issue#5561: Settings table custom size reverted by database repair
-issue#5572: RRD Checker timeouts to low
-issue#5573: Incorrect URL for editing graph template

Expand Down
5 changes: 2 additions & 3 deletions cacti.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2410,7 +2410,7 @@ CREATE TABLE `reports_items` (

CREATE TABLE settings (
name varchar(75) NOT NULL default '',
value varchar(2048) NOT NULL default '',
value varchar(4096) NOT NULL default '',
PRIMARY KEY (name)
) ENGINE=InnoDB ROW_FORMAT=Dynamic;

Expand All @@ -2428,15 +2428,14 @@ INSERT INTO settings VALUES ('selected_theme', 'modern');
CREATE TABLE settings_user (
user_id smallint(8) unsigned NOT NULL default '0',
name varchar(75) NOT NULL default '',
value varchar(2048) NOT NULL default '',
value varchar(4096) NOT NULL default '',
PRIMARY KEY (user_id, name)
) ENGINE=InnoDB ROW_FORMAT=Dynamic;

--
-- Dumping data for table `settings_user`
--


--
-- Table structure for table `settings_user_group`
--
Expand Down
4 changes: 2 additions & 2 deletions docs/audit_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -833,13 +833,13 @@ INSERT INTO `table_columns` VALUES ('sessions',6,'user_agent','varchar(128)','NO
INSERT INTO `table_columns` VALUES ('sessions',7,'start_time','timestamp','NO','','current_timestamp()','');
INSERT INTO `table_columns` VALUES ('sessions',8,'transactions','int(10) unsigned','NO','','1','');
INSERT INTO `table_columns` VALUES ('settings',1,'name','varchar(75)','NO','PRI','','');
INSERT INTO `table_columns` VALUES ('settings',2,'value','varchar(2048)','NO','','','');
INSERT INTO `table_columns` VALUES ('settings',2,'value','varchar(4096)','NO','','','');
INSERT INTO `table_columns` VALUES ('settings_tree',1,'user_id','mediumint(8) unsigned','NO','PRI','0','');
INSERT INTO `table_columns` VALUES ('settings_tree',2,'graph_tree_item_id','int(10) unsigned','NO','PRI','0','');
INSERT INTO `table_columns` VALUES ('settings_tree',3,'status','tinyint(4)','NO','','0','');
INSERT INTO `table_columns` VALUES ('settings_user',1,'user_id','smallint(8) unsigned','NO','PRI','0','');
INSERT INTO `table_columns` VALUES ('settings_user',2,'name','varchar(75)','NO','PRI','','');
INSERT INTO `table_columns` VALUES ('settings_user',3,'value','varchar(2048)','NO','','','');
INSERT INTO `table_columns` VALUES ('settings_user',3,'value','varchar(4096)','NO','','','');
INSERT INTO `table_columns` VALUES ('settings_user_group',1,'group_id','smallint(8) unsigned','NO','PRI','0','');
INSERT INTO `table_columns` VALUES ('settings_user_group',2,'name','varchar(50)','NO','PRI','','');
INSERT INTO `table_columns` VALUES ('settings_user_group',3,'value','varchar(2048)','NO','','','');
Expand Down
29 changes: 29 additions & 0 deletions install/upgrades/1_2_26.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2023 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/

function upgrade_to_1_2_26() {
db_install_execute("ALTER TABLE `settings` MODIFY `value` varchar(4096) not null default ''");
db_install_execute("ALTER TABLE `settings_user` MODIFY `value` varchar(4096) not null default ''");
}

0 comments on commit f3f25ed

Please sign in to comment.