cacti
cacti copied to clipboard
Plugin database tables are inconsistent in their usage
Describe the bug
Not all plugin tables are consistent, for example plugin_db_changes uses the plugin name for reference rather than id and that reference field plugin (16 chars) is shorter than the main plugin table which has either directory (32 chars) or name (64 chars).
Expected behavior
All plugin tables should have the single ID reference and use plugin_config table for any reference data.
Screenshots
mysql>desc plugin_config;
+-----------+-----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-----------------------+------+-----+---------+----------------+
| id | mediumint(8) unsigned | NO | PRI | NULL | auto_increment |
| directory | varchar(32) | NO | MUL | | |
| name | varchar(64) | NO | | | |
| status | tinyint(2) | NO | MUL | 0 | |
| author | varchar(64) | NO | | | |
| webpage | varchar(255) | NO | | | |
| version | varchar(8) | NO | | | |
+-----------+-----------------------+------+-----+---------+----------------+
mysql> desc plugin_db_changes;
+--------+-----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+-----------------------+------+-----+---------+----------------+
| id | mediumint(8) unsigned | NO | PRI | NULL | auto_increment |
| plugin | varchar(16) | NO | MUL | | |
| table | varchar(64) | NO | | | |
| column | varchar(64) | NO | | NULL | |
| method | varchar(16) | NO | MUL | | |
+--------+-----------------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
Might want to make this 1.3.
Good catch, it should have be marked for that, must have had mouse slippage when I clicked.