Report database schema issues here


#1

We have released an update to validate.php which will tell you if your dbSchema is wrong - we expect most people will be hit by this. Validate will provide you the queries to run to fix the issue but we’d like people to report those recommendations here first / as well so we can be sure the code is 100%.

Just as an FYI, your posts will be deleted once we’ve used the information and you’ve confirmed everything is ok - please don’t repost unless you have further issues.


DB problem
MariaDB error when trying to correct schema
Wrong services status
xDP network map doesn't work anymore
MySQL Error: Unknown column 'mempools.mempool_desc' in 'where clause'
Component - Roadmap
Mysql error - null in ports_stp table
#463

Hello,

./validate.php reports:

====================================

Component Version
LibreNMS 1.52-51-gc2b09b8
DB Schema 2019_05_30_225937_device_groups_rewrite (135)
PHP 7.1.29
MySQL 5.5.60-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

====================================

[OK] Composer Version: 1.8.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[WARN] Your database schema has extra migrations (2019_05_30_225937_device_groups_rewrite). If you just switched to the stable release from the daily release, your database is in between releases and this will be resolved with the next release.
[FAIL] Database: incorrect column (device_groups/desc)
[FAIL] Database: missing column (device_groups/params)
[FAIL] Database: extra column (device_groups/type)
[FAIL] Database: extra column (device_groups/rules)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on Discord (https://t.libren.ms/discord) or the community site (https://t.libren.ms/5gscd):
[FIX]:
Run the following SQL statements to fix.
SQL Statements:
ALTER TABLE device_groups CHANGE desc desc varchar(255) NOT NULL DEFAULT ‘’ ;
ALTER TABLE device_groups ADD params text NULL AFTER pattern;
ALTER TABLE device_groups DROP type;
ALTER TABLE device_groups DROP rules;

This happened after I ran ./daily.sh manually today (because I changed the purge-value for syslog).

Prior to daily.sh I already ran a validate.php which reported no issues:

====================================

Component Version
LibreNMS 1.52-50-gcfc51d5
DB Schema 2019_05_30_225937_device_groups_rewrite (135)
PHP 7.1.29
MySQL 5.5.60-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

====================================

[OK] Composer Version: 1.8.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Do I have to run the SQL statements to fix the table?

Thank you!
-awaum