feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY (#5327)

* feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY

* fix all schema errors and update system
This commit is contained in:
Neil Lathwood
2017-01-07 17:32:38 +00:00
committed by Tony Murray
parent 8936d9503b
commit da5783d917
33 changed files with 67 additions and 247 deletions

View File

@@ -5,6 +5,6 @@ CREATE TABLE IF NOT EXISTS `alert_log` ( `id` int(11) NOT NULL AUTO_INCREMENT,
DROP TABLE IF EXISTS `alert_rules`;
CREATE TABLE IF NOT EXISTS `alert_rules` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `rule` text CHARACTER SET utf8 NOT NULL, `severity` enum('ok','warning','critical') CHARACTER SET utf8 NOT NULL, `extra` varchar(255) CHARACTER SET utf8 NOT NULL, `disabled` tinyint(1) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `alert_schedule`;
CREATE TABLE IF NOT EXISTS `alert_schedule` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `start` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `alert_schedule` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `start` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01', `end` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01', PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `alert_templates`;
CREATE TABLE IF NOT EXISTS `alert_templates` ( `id` int(11) NOT NULL AUTO_INCREMENT, `rule_id` varchar(255) NOT NULL DEFAULT ',',`name` varchar(255) NOT NULL, `template` longtext NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;