librenms/sql-schema/253.sql
Tony Murray 4d9924242f
Database schema cleanup (#9064)
* target db_schema

* Database schema cleanup
Remove several inconsistencies (mostly with data types and lengths)
Make things a bit nicer to implement with Laravel database migrations.
poller* tables had f'd up indexes

* Update tests, extra noise because db returns numeric types now.

* Update test data again.

* fix 253 migration for mysql 5.3
2018-09-05 07:34:50 -05:00

4 lines
781 B
SQL

CREATE TABLE `poller_cluster` (`id` int(11) NOT NULL AUTO_INCREMENT, `node_id` varchar(255) NOT NULL, `poller_name` varchar(255) NOT NULL, `poller_version` varchar(255) NOT NULL DEFAULT '', `poller_groups` varchar(255) NOT NULL DEFAULT '', `last_report` datetime NOT NULL, `master` tinyint(1) NOT NULL, PRIMARY KEY (`node_id`), UNIQUE KEY `id` (`id`));
CREATE TABLE `poller_cluster_stats` (`id` int(11) NOT NULL AUTO_INCREMENT, `parent_poller` int(11) NOT NULL DEFAULT 0, `poller_type` varchar(64) NOT NULL DEFAULT '', `depth` int(11) unsigned NOT NULL, `devices` int(11) unsigned NOT NULL, `worker_seconds` double unsigned NOT NULL, `workers` int(11) unsigned NOT NULL, `frequency` int(11) unsigned NOT NULL, PRIMARY KEY (`parent_poller`,`poller_type`), UNIQUE KEY `id` (`id`));