Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
*************************** 1. row ***************************
acknowledges
CREATE TABLE `acknowledges` (
`acknowledgeid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
`eventid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`message` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`acknowledgeid`),
KEY `acknowledges_1` (`userid`),
KEY `acknowledges_2` (`eventid`),
KEY `acknowledges_3` (`clock`),
CONSTRAINT `c_acknowledges_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE,
CONSTRAINT `c_acknowledges_2` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
actions
CREATE TABLE `actions` (
`actionid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`eventsource` int(11) NOT NULL DEFAULT '0',
`evaltype` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0',
`esc_period` int(11) NOT NULL DEFAULT '0',
`def_shortdata` varchar(255) NOT NULL DEFAULT '',
`def_longdata` text NOT NULL,
`recovery_msg` int(11) NOT NULL DEFAULT '0',
`r_shortdata` varchar(255) NOT NULL DEFAULT '',
`r_longdata` text NOT NULL,
PRIMARY KEY (`actionid`),
KEY `actions_1` (`eventsource`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
actions_tmp
CREATE TABLE `actions_tmp` (
`actionid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`eventsource` int(11) NOT NULL DEFAULT '0',
`evaltype` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0',
`esc_period` int(11) NOT NULL DEFAULT '0',
`def_shortdata` varchar(255) NOT NULL DEFAULT '',
`def_longdata` text NOT NULL,
`recovery_msg` int(11) NOT NULL DEFAULT '0',
`r_shortdata` varchar(255) NOT NULL DEFAULT '',
`r_longdata` text NOT NULL,
PRIMARY KEY (`actionid`),
KEY `actions_1` (`eventsource`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
alerts
CREATE TABLE `alerts` (
`alertid` bigint(20) unsigned NOT NULL,
`actionid` bigint(20) unsigned NOT NULL,
`eventid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned DEFAULT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`mediatypeid` bigint(20) unsigned DEFAULT NULL,
`sendto` varchar(100) NOT NULL DEFAULT '',
`subject` varchar(255) NOT NULL DEFAULT '',
`message` text NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`retries` int(11) NOT NULL DEFAULT '0',
`error` varchar(128) NOT NULL DEFAULT '',
`esc_step` int(11) NOT NULL DEFAULT '0',
`alerttype` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`alertid`),
KEY `alerts_1` (`actionid`),
KEY `alerts_2` (`clock`),
KEY `alerts_3` (`eventid`),
KEY `alerts_4` (`status`,`retries`),
KEY `alerts_5` (`mediatypeid`),
KEY `alerts_6` (`userid`),
CONSTRAINT `c_alerts_1` FOREIGN KEY (`actionid`) REFERENCES `actions` (`actionid`) ON DELETE CASCADE,
CONSTRAINT `c_alerts_2` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE,
CONSTRAINT `c_alerts_3` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE,
CONSTRAINT `c_alerts_4` FOREIGN KEY (`mediatypeid`) REFERENCES `media_type` (`mediatypeid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
application_template
CREATE TABLE `application_template` (
`application_templateid` bigint(20) unsigned NOT NULL,
`applicationid` bigint(20) unsigned NOT NULL,
`templateid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`application_templateid`),
UNIQUE KEY `application_template_1` (`applicationid`,`templateid`),
KEY `application_template_2` (`templateid`),
CONSTRAINT `c_application_template_1` FOREIGN KEY (`applicationid`) REFERENCES `applications` (`applicationid`) ON DELETE CASCADE,
CONSTRAINT `c_application_template_2` FOREIGN KEY (`templateid`) REFERENCES `applications` (`applicationid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
applications
CREATE TABLE `applications` (
`applicationid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
`name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
PRIMARY KEY (`applicationid`),
UNIQUE KEY `applications_2` (`hostid`,`name`),
CONSTRAINT `c_applications_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
*************************** 1. row ***************************
applications_tmp
CREATE TABLE `applications_tmp` (
`applicationid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`applicationid`),
UNIQUE KEY `applications_2` (`hostid`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
auditlog
CREATE TABLE `auditlog` (
`auditid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`action` int(11) NOT NULL DEFAULT '0',
`resourcetype` int(11) NOT NULL DEFAULT '0',
`details` varchar(128) NOT NULL DEFAULT '0',
`ip` varchar(39) NOT NULL DEFAULT '',
`resourceid` bigint(20) unsigned NOT NULL DEFAULT '0',
`resourcename` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`auditid`),
KEY `auditlog_1` (`userid`,`clock`),
KEY `auditlog_2` (`clock`),
CONSTRAINT `c_auditlog_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
auditlog_details
CREATE TABLE `auditlog_details` (
`auditdetailid` bigint(20) unsigned NOT NULL,
`auditid` bigint(20) unsigned NOT NULL,
`table_name` varchar(64) NOT NULL DEFAULT '',
`field_name` varchar(64) NOT NULL DEFAULT '',
`oldvalue` text NOT NULL,
`newvalue` text NOT NULL,
PRIMARY KEY (`auditdetailid`),
KEY `auditlog_details_1` (`auditid`),
CONSTRAINT `c_auditlog_details_1` FOREIGN KEY (`auditid`) REFERENCES `auditlog` (`auditid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
autoreg_host
CREATE TABLE `autoreg_host` (
`autoreg_hostid` bigint(20) unsigned NOT NULL,
`proxy_hostid` bigint(20) unsigned DEFAULT NULL,
`host` varchar(64) NOT NULL DEFAULT '',
`listen_ip` varchar(39) NOT NULL DEFAULT '',
`listen_port` int(11) NOT NULL DEFAULT '0',
`listen_dns` varchar(64) NOT NULL DEFAULT '',
`host_metadata` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`autoreg_hostid`),
KEY `autoreg_host_1` (`proxy_hostid`,`host`),
CONSTRAINT `c_autoreg_host_1` FOREIGN KEY (`proxy_hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
conditions
CREATE TABLE `conditions` (
`conditionid` bigint(20) unsigned NOT NULL,
`actionid` bigint(20) unsigned NOT NULL,
`conditiontype` int(11) NOT NULL DEFAULT '0',
`operator` int(11) NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`conditionid`),
KEY `conditions_1` (`actionid`),
CONSTRAINT `c_conditions_1` FOREIGN KEY (`actionid`) REFERENCES `actions` (`actionid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
config
CREATE TABLE `config` (
`configid` bigint(20) unsigned NOT NULL,
`refresh_unsupported` int(11) NOT NULL DEFAULT '0',
`work_period` varchar(100) NOT NULL DEFAULT '1-5,00:00-24:00',
`alert_usrgrpid` bigint(20) unsigned DEFAULT NULL,
`event_ack_enable` int(11) NOT NULL DEFAULT '1',
`event_expire` int(11) NOT NULL DEFAULT '7',
`event_show_max` int(11) NOT NULL DEFAULT '100',
`default_theme` varchar(128) NOT NULL DEFAULT 'originalblue',
`authentication_type` int(11) NOT NULL DEFAULT '0',
`ldap_host` varchar(255) NOT NULL DEFAULT '',
`ldap_port` int(11) NOT NULL DEFAULT '389',
`ldap_base_dn` varchar(255) NOT NULL DEFAULT '',
`ldap_bind_dn` varchar(255) NOT NULL DEFAULT '',
`ldap_bind_password` varchar(128) NOT NULL DEFAULT '',
`ldap_search_attribute` varchar(128) NOT NULL DEFAULT '',
`dropdown_first_entry` int(11) NOT NULL DEFAULT '1',
`dropdown_first_remember` int(11) NOT NULL DEFAULT '1',
`discovery_groupid` bigint(20) unsigned NOT NULL,
`max_in_table` int(11) NOT NULL DEFAULT '50',
`search_limit` int(11) NOT NULL DEFAULT '1000',
`severity_color_0` varchar(6) NOT NULL DEFAULT 'DBDBDB',
`severity_color_1` varchar(6) NOT NULL DEFAULT 'D6F6FF',
`severity_color_2` varchar(6) NOT NULL DEFAULT 'FFF6A5',
`severity_color_3` varchar(6) NOT NULL DEFAULT 'FFB689',
`severity_color_4` varchar(6) NOT NULL DEFAULT 'FF9999',
`severity_color_5` varchar(6) NOT NULL DEFAULT 'FF3838',
`severity_name_0` varchar(32) NOT NULL DEFAULT 'Not classified',
`severity_name_1` varchar(32) NOT NULL DEFAULT 'Information',
`severity_name_2` varchar(32) NOT NULL DEFAULT 'Warning',
`severity_name_3` varchar(32) NOT NULL DEFAULT 'Average',
`severity_name_4` varchar(32) NOT NULL DEFAULT 'High',
`severity_name_5` varchar(32) NOT NULL DEFAULT 'Disaster',
`ok_period` int(11) NOT NULL DEFAULT '1800',
`blink_period` int(11) NOT NULL DEFAULT '1800',
`problem_unack_color` varchar(6) NOT NULL DEFAULT 'DC0000',
`problem_ack_color` varchar(6) NOT NULL DEFAULT 'DC0000',
`ok_unack_color` varchar(6) NOT NULL DEFAULT '00AA00',
`ok_ack_color` varchar(6) NOT NULL DEFAULT '00AA00',
`problem_unack_style` int(11) NOT NULL DEFAULT '1',
`problem_ack_style` int(11) NOT NULL DEFAULT '1',
`ok_unack_style` int(11) NOT NULL DEFAULT '1',
`ok_ack_style` int(11) NOT NULL DEFAULT '1',
`snmptrap_logging` int(11) NOT NULL DEFAULT '1',
`server_check_interval` int(11) NOT NULL DEFAULT '10',
`hk_events_mode` int(11) NOT NULL DEFAULT '1',
`hk_events_trigger` int(11) NOT NULL DEFAULT '365',
`hk_events_internal` int(11) NOT NULL DEFAULT '365',
`hk_events_discovery` int(11) NOT NULL DEFAULT '365',
`hk_events_autoreg` int(11) NOT NULL DEFAULT '365',
`hk_services_mode` int(11) NOT NULL DEFAULT '1',
`hk_services` int(11) NOT NULL DEFAULT '365',
`hk_audit_mode` int(11) NOT NULL DEFAULT '1',
`hk_audit` int(11) NOT NULL DEFAULT '365',
`hk_sessions_mode` int(11) NOT NULL DEFAULT '1',
`hk_sessions` int(11) NOT NULL DEFAULT '365',
`hk_history_mode` int(11) NOT NULL DEFAULT '1',
`hk_history_global` int(11) NOT NULL DEFAULT '0',
`hk_history` int(11) NOT NULL DEFAULT '90',
`hk_trends_mode` int(11) NOT NULL DEFAULT '1',
`hk_trends_global` int(11) NOT NULL DEFAULT '0',
`hk_trends` int(11) NOT NULL DEFAULT '365',
PRIMARY KEY (`configid`),
KEY `c_config_1` (`alert_usrgrpid`),
KEY `c_config_2` (`discovery_groupid`),
KEY `config_1` (`alert_usrgrpid`),
KEY `config_2` (`discovery_groupid`),
CONSTRAINT `c_config_1` FOREIGN KEY (`alert_usrgrpid`) REFERENCES `usrgrp` (`usrgrpid`),
CONSTRAINT `c_config_2` FOREIGN KEY (`discovery_groupid`) REFERENCES `groups` (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
dbversion
CREATE TABLE `dbversion` (
`mandatory` int(11) NOT NULL DEFAULT '0',
`optional` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
dchecks
CREATE TABLE `dchecks` (
`dcheckid` bigint(20) unsigned NOT NULL,
`druleid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`key_` varchar(255) NOT NULL DEFAULT '',
`snmp_community` varchar(255) NOT NULL DEFAULT '',
`ports` varchar(255) NOT NULL DEFAULT '0',
`snmpv3_securityname` varchar(64) NOT NULL DEFAULT '',
`snmpv3_securitylevel` int(11) NOT NULL DEFAULT '0',
`snmpv3_authpassphrase` varchar(64) NOT NULL DEFAULT '',
`snmpv3_privpassphrase` varchar(64) NOT NULL DEFAULT '',
`uniq` int(11) NOT NULL DEFAULT '0',
`snmpv3_authprotocol` int(11) NOT NULL DEFAULT '0',
`snmpv3_privprotocol` int(11) NOT NULL DEFAULT '0',
`snmpv3_contextname` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`dcheckid`),
KEY `dchecks_1` (`druleid`),
CONSTRAINT `c_dchecks_1` FOREIGN KEY (`druleid`) REFERENCES `drules` (`druleid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
dhosts
CREATE TABLE `dhosts` (
`dhostid` bigint(20) unsigned NOT NULL,
`druleid` bigint(20) unsigned NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`lastup` int(11) NOT NULL DEFAULT '0',
`lastdown` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`dhostid`),
KEY `dhosts_1` (`druleid`),
CONSTRAINT `c_dhosts_1` FOREIGN KEY (`druleid`) REFERENCES `drules` (`druleid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
drules
CREATE TABLE `drules` (
`druleid` bigint(20) unsigned NOT NULL,
`proxy_hostid` bigint(20) unsigned DEFAULT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`iprange` varchar(255) NOT NULL DEFAULT '',
`delay` int(11) NOT NULL DEFAULT '3600',
`nextcheck` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`druleid`),
KEY `c_drules_1` (`proxy_hostid`),
KEY `drules_1` (`proxy_hostid`),
CONSTRAINT `c_drules_1` FOREIGN KEY (`proxy_hostid`) REFERENCES `hosts` (`hostid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
dservices
CREATE TABLE `dservices` (
`dserviceid` bigint(20) unsigned NOT NULL,
`dhostid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`key_` varchar(255) NOT NULL DEFAULT '',
`value` varchar(255) NOT NULL DEFAULT '',
`port` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0',
`lastup` int(11) NOT NULL DEFAULT '0',
`lastdown` int(11) NOT NULL DEFAULT '0',
`dcheckid` bigint(20) unsigned NOT NULL,
`ip` varchar(39) NOT NULL DEFAULT '',
`dns` varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY (`dserviceid`),
UNIQUE KEY `dservices_1` (`dcheckid`,`type`,`key_`,`ip`,`port`),
KEY `dservices_2` (`dhostid`),
CONSTRAINT `c_dservices_1` FOREIGN KEY (`dhostid`) REFERENCES `dhosts` (`dhostid`) ON DELETE CASCADE,
CONSTRAINT `c_dservices_2` FOREIGN KEY (`dcheckid`) REFERENCES `dchecks` (`dcheckid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
escalations
CREATE TABLE `escalations` (
`escalationid` bigint(20) unsigned NOT NULL,
`actionid` bigint(20) unsigned NOT NULL,
`triggerid` bigint(20) unsigned DEFAULT NULL,
`eventid` bigint(20) unsigned DEFAULT NULL,
`r_eventid` bigint(20) unsigned DEFAULT NULL,
`nextcheck` int(11) NOT NULL DEFAULT '0',
`esc_step` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0',
`itemid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`escalationid`),
UNIQUE KEY `escalations_1` (`actionid`,`triggerid`,`itemid`,`escalationid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
events
CREATE TABLE `events` (
`eventid` bigint(20) unsigned NOT NULL,
`source` int(11) NOT NULL DEFAULT '0',
`object` int(11) NOT NULL DEFAULT '0',
`objectid` bigint(20) unsigned NOT NULL DEFAULT '0',
`clock` int(11) NOT NULL DEFAULT '0',
`value` int(11) NOT NULL DEFAULT '0',
`acknowledged` int(11) NOT NULL DEFAULT '0',
`ns` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`eventid`),
KEY `events_1` (`source`,`object`,`objectid`,`clock`),
KEY `events_2` (`source`,`object`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
expressions
CREATE TABLE `expressions` (
`expressionid` bigint(20) unsigned NOT NULL,
`regexpid` bigint(20) unsigned NOT NULL,
`expression` varchar(255) NOT NULL DEFAULT '',
`expression_type` int(11) NOT NULL DEFAULT '0',
`exp_delimiter` varchar(1) NOT NULL DEFAULT '',
`case_sensitive` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`expressionid`),
KEY `expressions_1` (`regexpid`),
CONSTRAINT `c_expressions_1` FOREIGN KEY (`regexpid`) REFERENCES `regexps` (`regexpid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
functions
CREATE TABLE `functions` (
`functionid` bigint(20) unsigned NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`triggerid` bigint(20) unsigned NOT NULL,
`function` varchar(12) NOT NULL DEFAULT '',
`parameter` varchar(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`functionid`),
KEY `functions_1` (`triggerid`),
KEY `functions_2` (`itemid`,`function`,`parameter`),
CONSTRAINT `c_functions_1` FOREIGN KEY (`itemid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE,
CONSTRAINT `c_functions_2` FOREIGN KEY (`triggerid`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
globalmacro
CREATE TABLE `globalmacro` (
`globalmacroid` bigint(20) unsigned NOT NULL,
`macro` varchar(64) NOT NULL DEFAULT '',
`value` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`globalmacroid`),
KEY `globalmacro_1` (`macro`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
globalvars
CREATE TABLE `globalvars` (
`globalvarid` bigint(20) unsigned NOT NULL,
`snmp_lastsize` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`globalvarid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
graph_discovery
CREATE TABLE `graph_discovery` (
`graphdiscoveryid` bigint(20) unsigned NOT NULL,
`graphid` bigint(20) unsigned NOT NULL,
`parent_graphid` bigint(20) unsigned NOT NULL,
`name` varchar(128) NOT NULL DEFAULT '',
PRIMARY KEY (`graphdiscoveryid`),
UNIQUE KEY `graph_discovery_1` (`graphid`,`parent_graphid`),
KEY `c_graph_discovery_2` (`parent_graphid`),
KEY `graph_discovery_2` (`parent_graphid`),
CONSTRAINT `c_graph_discovery_1` FOREIGN KEY (`graphid`) REFERENCES `graphs` (`graphid`) ON DELETE CASCADE,
CONSTRAINT `c_graph_discovery_2` FOREIGN KEY (`parent_graphid`) REFERENCES `graphs` (`graphid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
graph_theme
CREATE TABLE `graph_theme` (
`graphthemeid` bigint(20) unsigned NOT NULL,
`description` varchar(64) NOT NULL DEFAULT '',
`theme` varchar(64) NOT NULL DEFAULT '',
`backgroundcolor` varchar(6) NOT NULL DEFAULT 'F0F0F0',
`graphcolor` varchar(6) NOT NULL DEFAULT 'FFFFFF',
`graphbordercolor` varchar(6) NOT NULL DEFAULT '222222',
`gridcolor` varchar(6) NOT NULL DEFAULT 'CCCCCC',
`maingridcolor` varchar(6) NOT NULL DEFAULT 'AAAAAA',
`gridbordercolor` varchar(6) NOT NULL DEFAULT '000000',
`textcolor` varchar(6) NOT NULL DEFAULT '202020',
`highlightcolor` varchar(6) NOT NULL DEFAULT 'AA4444',
`leftpercentilecolor` varchar(6) NOT NULL DEFAULT '11CC11',
`rightpercentilecolor` varchar(6) NOT NULL DEFAULT 'CC1111',
`nonworktimecolor` varchar(6) NOT NULL DEFAULT 'CCCCCC',
`gridview` int(11) NOT NULL DEFAULT '1',
`legendview` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`graphthemeid`),
KEY `graph_theme_1` (`description`),
KEY `graph_theme_2` (`theme`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
graphs
CREATE TABLE `graphs` (
`graphid` bigint(20) unsigned NOT NULL,
`name` varchar(128) NOT NULL DEFAULT '',
`width` int(11) NOT NULL DEFAULT '900',
`height` int(11) NOT NULL DEFAULT '200',
`yaxismin` double(16,4) NOT NULL DEFAULT '0.0000',
`yaxismax` double(16,4) NOT NULL DEFAULT '100.0000',
`templateid` bigint(20) unsigned DEFAULT NULL,
`show_work_period` int(11) NOT NULL DEFAULT '1',
`show_triggers` int(11) NOT NULL DEFAULT '1',
`graphtype` int(11) NOT NULL DEFAULT '0',
`show_legend` int(11) NOT NULL DEFAULT '1',
`show_3d` int(11) NOT NULL DEFAULT '0',
`percent_left` double(16,4) NOT NULL DEFAULT '0.0000',
`percent_right` double(16,4) NOT NULL DEFAULT '0.0000',
`ymin_type` int(11) NOT NULL DEFAULT '0',
`ymax_type` int(11) NOT NULL DEFAULT '0',
`ymin_itemid` bigint(20) unsigned DEFAULT NULL,
`ymax_itemid` bigint(20) unsigned DEFAULT NULL,
`flags` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`graphid`),
KEY `c_graphs_1` (`templateid`),
KEY `c_graphs_2` (`ymin_itemid`),
KEY `c_graphs_3` (`ymax_itemid`),
KEY `graphs_2` (`templateid`),
KEY `graphs_3` (`ymin_itemid`),
KEY `graphs_4` (`ymax_itemid`),
KEY `graphs_1` (`name`),
CONSTRAINT `c_graphs_1` FOREIGN KEY (`templateid`) REFERENCES `graphs` (`graphid`) ON DELETE CASCADE,
CONSTRAINT `c_graphs_2` FOREIGN KEY (`ymin_itemid`) REFERENCES `items` (`itemid`),
CONSTRAINT `c_graphs_3` FOREIGN KEY (`ymax_itemid`) REFERENCES `items` (`itemid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
graphs_items
CREATE TABLE `graphs_items` (
`gitemid` bigint(20) unsigned NOT NULL,
`graphid` bigint(20) unsigned NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`drawtype` int(11) NOT NULL DEFAULT '0',
`sortorder` int(11) NOT NULL DEFAULT '0',
`color` varchar(6) NOT NULL DEFAULT '009600',
`yaxisside` int(11) NOT NULL DEFAULT '0',
`calc_fnc` int(11) NOT NULL DEFAULT '2',
`type` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`gitemid`),
KEY `graphs_items_1` (`itemid`),
KEY `graphs_items_2` (`graphid`),
CONSTRAINT `c_graphs_items_1` FOREIGN KEY (`graphid`) REFERENCES `graphs` (`graphid`) ON DELETE CASCADE,
CONSTRAINT `c_graphs_items_2` FOREIGN KEY (`itemid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
group_discovery
CREATE TABLE `group_discovery` (
`groupid` bigint(20) unsigned NOT NULL,
`parent_group_prototypeid` bigint(20) unsigned NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`lastcheck` int(11) NOT NULL DEFAULT '0',
`ts_delete` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`groupid`),
KEY `c_group_discovery_2` (`parent_group_prototypeid`),
CONSTRAINT `c_group_discovery_1` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`) ON DELETE CASCADE,
CONSTRAINT `c_group_discovery_2` FOREIGN KEY (`parent_group_prototypeid`) REFERENCES `group_prototype` (`group_prototypeid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
group_prototype
CREATE TABLE `group_prototype` (
`group_prototypeid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`groupid` bigint(20) unsigned DEFAULT NULL,
`templateid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`group_prototypeid`),
KEY `c_group_prototype_2` (`groupid`),
KEY `c_group_prototype_3` (`templateid`),
KEY `group_prototype_1` (`hostid`),
CONSTRAINT `c_group_prototype_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE,
CONSTRAINT `c_group_prototype_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`),
CONSTRAINT `c_group_prototype_3` FOREIGN KEY (`templateid`) REFERENCES `group_prototype` (`group_prototypeid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
groups
CREATE TABLE `groups` (
`groupid` bigint(20) unsigned NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`internal` int(11) NOT NULL DEFAULT '0',
`flags` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`groupid`),
KEY `groups_1` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
history
CREATE TABLE `history` (
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`value` double(16,4) NOT NULL DEFAULT '0.0000',
`ns` int(11) NOT NULL DEFAULT '0',
KEY `history_1` (`itemid`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE ( clock)
(PARTITION p20161112 VALUES LESS THAN (1479099600) ENGINE = InnoDB,
PARTITION p20161113 VALUES LESS THAN (1479186000) ENGINE = InnoDB,
PARTITION p20161114 VALUES LESS THAN (1479272400) ENGINE = InnoDB,
PARTITION p20161115 VALUES LESS THAN (1479276000) ENGINE = InnoDB,
PARTITION p20161116 VALUES LESS THAN (1479362400) ENGINE = InnoDB,
PARTITION p20161117 VALUES LESS THAN (1479448800) ENGINE = InnoDB,
PARTITION p20161118 VALUES LESS THAN (1479535200) ENGINE = InnoDB,
PARTITION p20161119 VALUES LESS THAN (1479621600) ENGINE = InnoDB,
PARTITION p20161120 VALUES LESS THAN (1479708000) ENGINE = InnoDB,
PARTITION p20161121 VALUES LESS THAN (1479794400) ENGINE = InnoDB,
PARTITION p20161122 VALUES LESS THAN (1479880800) ENGINE = InnoDB,
PARTITION p20161123 VALUES LESS THAN (1479967200) ENGINE = InnoDB,
PARTITION p20161124 VALUES LESS THAN (1480053600) ENGINE = InnoDB,
PARTITION p20161125 VALUES LESS THAN (1480140000) ENGINE = InnoDB,
PARTITION p20161126 VALUES LESS THAN (1480226400) ENGINE = InnoDB,
PARTITION p20161127 VALUES LESS THAN (1480312800) ENGINE = InnoDB,
PARTITION p20161128 VALUES LESS THAN (1480399200) ENGINE = InnoDB,
PARTITION p20161129 VALUES LESS THAN (1480485600) ENGINE = InnoDB) */
*************************** 1. row ***************************
history_log
CREATE TABLE `history_log` (
`id` bigint(20) unsigned NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`timestamp` int(11) NOT NULL DEFAULT '0',
`source` varchar(64) NOT NULL DEFAULT '',
`severity` int(11) NOT NULL DEFAULT '0',
`value` text NOT NULL,
`logeventid` int(11) NOT NULL DEFAULT '0',
`ns` int(11) NOT NULL DEFAULT '0',
KEY `history_log_1` (`itemid`,`clock`),
KEY `history_log_00` (`id`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE ( clock)
(PARTITION p20161021 VALUES LESS THAN (1477112400) ENGINE = InnoDB,
PARTITION p20161022 VALUES LESS THAN (1477198800) ENGINE = InnoDB,
PARTITION p20161023 VALUES LESS THAN (1477285200) ENGINE = InnoDB,
PARTITION p20161024 VALUES LESS THAN (1477371600) ENGINE = InnoDB,
PARTITION p20161025 VALUES LESS THAN (1477458000) ENGINE = InnoDB,
PARTITION p20161026 VALUES LESS THAN (1477544400) ENGINE = InnoDB,
PARTITION p20161027 VALUES LESS THAN (1477630800) ENGINE = InnoDB,
PARTITION p20161028 VALUES LESS THAN (1477717200) ENGINE = InnoDB,
PARTITION p20161029 VALUES LESS THAN (1477803600) ENGINE = InnoDB,
PARTITION p20161030 VALUES LESS THAN (1477890000) ENGINE = InnoDB,
PARTITION p20161031 VALUES LESS THAN (1477976400) ENGINE = InnoDB,
PARTITION p20161101 VALUES LESS THAN (1478062800) ENGINE = InnoDB,
PARTITION p20161102 VALUES LESS THAN (1478149200) ENGINE = InnoDB,
PARTITION p20161103 VALUES LESS THAN (1478235600) ENGINE = InnoDB,
PARTITION p20161104 VALUES LESS THAN (1478322000) ENGINE = InnoDB,
PARTITION p20161105 VALUES LESS THAN (1478408400) ENGINE = InnoDB,
PARTITION p20161106 VALUES LESS THAN (1478494800) ENGINE = InnoDB,
PARTITION p20161107 VALUES LESS THAN (1478667600) ENGINE = InnoDB,
PARTITION p20161108 VALUES LESS THAN (1478754000) ENGINE = InnoDB,
PARTITION p20161109 VALUES LESS THAN (1478840400) ENGINE = InnoDB,
PARTITION p20161110 VALUES LESS THAN (1478926800) ENGINE = InnoDB,
PARTITION p20161111 VALUES LESS THAN (1479013200) ENGINE = InnoDB,
PARTITION p20161112 VALUES LESS THAN (1479099600) ENGINE = InnoDB,
PARTITION p20161113 VALUES LESS THAN (1479186000) ENGINE = InnoDB,
PARTITION p20161114 VALUES LESS THAN (1479272400) ENGINE = InnoDB,
PARTITION p20161115 VALUES LESS THAN (1479276000) ENGINE = InnoDB,
PARTITION p20161116 VALUES LESS THAN (1479362400) ENGINE = InnoDB,
PARTITION p20161117 VALUES LESS THAN (1479448800) ENGINE = InnoDB,
PARTITION p20161118 VALUES LESS THAN (1479535200) ENGINE = InnoDB,
PARTITION p20161119 VALUES LESS THAN (1479621600) ENGINE = InnoDB,
PARTITION p20161120 VALUES LESS THAN (1479708000) ENGINE = InnoDB,
PARTITION p20161121 VALUES LESS THAN (1479794400) ENGINE = InnoDB,
PARTITION p20161122 VALUES LESS THAN (1479880800) ENGINE = InnoDB,
PARTITION p20161123 VALUES LESS THAN (1479967200) ENGINE = InnoDB,
PARTITION p20161124 VALUES LESS THAN (1480053600) ENGINE = InnoDB,
PARTITION p20161125 VALUES LESS THAN (1480140000) ENGINE = InnoDB,
PARTITION p20161126 VALUES LESS THAN (1480226400) ENGINE = InnoDB,
PARTITION p20161127 VALUES LESS THAN (1480312800) ENGINE = InnoDB,
PARTITION p20161128 VALUES LESS THAN (1480399200) ENGINE = InnoDB,
PARTITION p20161129 VALUES LESS THAN (1480485600) ENGINE = InnoDB) */
*************************** 1. row ***************************
history_str
CREATE TABLE `history_str` (
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
`ns` int(11) NOT NULL DEFAULT '0',
KEY `history_str_1` (`itemid`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE ( clock)
(PARTITION p20161021 VALUES LESS THAN (1477112400) ENGINE = InnoDB,
PARTITION p20161022 VALUES LESS THAN (1477198800) ENGINE = InnoDB,
PARTITION p20161023 VALUES LESS THAN (1477285200) ENGINE = InnoDB,
PARTITION p20161024 VALUES LESS THAN (1477371600) ENGINE = InnoDB,
PARTITION p20161025 VALUES LESS THAN (1477458000) ENGINE = InnoDB,
PARTITION p20161026 VALUES LESS THAN (1477544400) ENGINE = InnoDB,
PARTITION p20161027 VALUES LESS THAN (1477630800) ENGINE = InnoDB,
PARTITION p20161028 VALUES LESS THAN (1477717200) ENGINE = InnoDB,
PARTITION p20161029 VALUES LESS THAN (1477803600) ENGINE = InnoDB,
PARTITION p20161030 VALUES LESS THAN (1477890000) ENGINE = InnoDB,
PARTITION p20161031 VALUES LESS THAN (1477976400) ENGINE = InnoDB,
PARTITION p20161101 VALUES LESS THAN (1478062800) ENGINE = InnoDB,
PARTITION p20161102 VALUES LESS THAN (1478149200) ENGINE = InnoDB,
PARTITION p20161103 VALUES LESS THAN (1478235600) ENGINE = InnoDB,
PARTITION p20161104 VALUES LESS THAN (1478322000) ENGINE = InnoDB,
PARTITION p20161105 VALUES LESS THAN (1478408400) ENGINE = InnoDB,
PARTITION p20161106 VALUES LESS THAN (1478494800) ENGINE = InnoDB,
PARTITION p20161107 VALUES LESS THAN (1478667600) ENGINE = InnoDB,
PARTITION p20161108 VALUES LESS THAN (1478754000) ENGINE = InnoDB,
PARTITION p20161109 VALUES LESS THAN (1478840400) ENGINE = InnoDB,
PARTITION p20161110 VALUES LESS THAN (1478926800) ENGINE = InnoDB,
PARTITION p20161111 VALUES LESS THAN (1479013200) ENGINE = InnoDB,
PARTITION p20161112 VALUES LESS THAN (1479099600) ENGINE = InnoDB,
PARTITION p20161113 VALUES LESS THAN (1479186000) ENGINE = InnoDB,
PARTITION p20161114 VALUES LESS THAN (1479272400) ENGINE = InnoDB,
PARTITION p20161115 VALUES LESS THAN (1479276000) ENGINE = InnoDB,
PARTITION p20161116 VALUES LESS THAN (1479362400) ENGINE = InnoDB,
PARTITION p20161117 VALUES LESS THAN (1479448800) ENGINE = InnoDB,
PARTITION p20161118 VALUES LESS THAN (1479535200) ENGINE = InnoDB,
PARTITION p20161119 VALUES LESS THAN (1479621600) ENGINE = InnoDB,
PARTITION p20161120 VALUES LESS THAN (1479708000) ENGINE = InnoDB,
PARTITION p20161121 VALUES LESS THAN (1479794400) ENGINE = InnoDB,
PARTITION p20161122 VALUES LESS THAN (1479880800) ENGINE = InnoDB,
PARTITION p20161123 VALUES LESS THAN (1479967200) ENGINE = InnoDB,
PARTITION p20161124 VALUES LESS THAN (1480053600) ENGINE = InnoDB,
PARTITION p20161125 VALUES LESS THAN (1480140000) ENGINE = InnoDB,
PARTITION p20161126 VALUES LESS THAN (1480226400) ENGINE = InnoDB,
PARTITION p20161127 VALUES LESS THAN (1480312800) ENGINE = InnoDB,
PARTITION p20161128 VALUES LESS THAN (1480399200) ENGINE = InnoDB,
PARTITION p20161129 VALUES LESS THAN (1480485600) ENGINE = InnoDB) */
*************************** 1. row ***************************
history_str_sync
CREATE TABLE `history_str_sync` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`nodeid` int(11) NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
`ns` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `history_str_sync_1` (`nodeid`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
history_sync
CREATE TABLE `history_sync` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`nodeid` int(11) NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`value` double(16,4) NOT NULL DEFAULT '0.0000',
`ns` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `history_sync_1` (`nodeid`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
history_text
CREATE TABLE `history_text` (
`id` bigint(20) unsigned NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`value` text NOT NULL,
`ns` int(11) NOT NULL DEFAULT '0',
KEY `history_text_1` (`itemid`,`clock`),
KEY `history_text_00` (`id`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE ( clock)
(PARTITION p20161021 VALUES LESS THAN (1477112400) ENGINE = InnoDB,
PARTITION p20161022 VALUES LESS THAN (1477198800) ENGINE = InnoDB,
PARTITION p20161023 VALUES LESS THAN (1477285200) ENGINE = InnoDB,
PARTITION p20161024 VALUES LESS THAN (1477371600) ENGINE = InnoDB,
PARTITION p20161025 VALUES LESS THAN (1477458000) ENGINE = InnoDB,
PARTITION p20161026 VALUES LESS THAN (1477544400) ENGINE = InnoDB,
PARTITION p20161027 VALUES LESS THAN (1477630800) ENGINE = InnoDB,
PARTITION p20161028 VALUES LESS THAN (1477717200) ENGINE = InnoDB,
PARTITION p20161029 VALUES LESS THAN (1477803600) ENGINE = InnoDB,
PARTITION p20161030 VALUES LESS THAN (1477890000) ENGINE = InnoDB,
PARTITION p20161031 VALUES LESS THAN (1477976400) ENGINE = InnoDB,
PARTITION p20161101 VALUES LESS THAN (1478062800) ENGINE = InnoDB,
PARTITION p20161102 VALUES LESS THAN (1478149200) ENGINE = InnoDB,
PARTITION p20161103 VALUES LESS THAN (1478235600) ENGINE = InnoDB,
PARTITION p20161104 VALUES LESS THAN (1478322000) ENGINE = InnoDB,
PARTITION p20161105 VALUES LESS THAN (1478408400) ENGINE = InnoDB,
PARTITION p20161106 VALUES LESS THAN (1478494800) ENGINE = InnoDB,
PARTITION p20161107 VALUES LESS THAN (1478667600) ENGINE = InnoDB,
PARTITION p20161108 VALUES LESS THAN (1478754000) ENGINE = InnoDB,
PARTITION p20161109 VALUES LESS THAN (1478840400) ENGINE = InnoDB,
PARTITION p20161110 VALUES LESS THAN (1478926800) ENGINE = InnoDB,
PARTITION p20161111 VALUES LESS THAN (1479013200) ENGINE = InnoDB,
PARTITION p20161112 VALUES LESS THAN (1479099600) ENGINE = InnoDB,
PARTITION p20161113 VALUES LESS THAN (1479186000) ENGINE = InnoDB,
PARTITION p20161114 VALUES LESS THAN (1479272400) ENGINE = InnoDB,
PARTITION p20161115 VALUES LESS THAN (1479276000) ENGINE = InnoDB,
PARTITION p20161116 VALUES LESS THAN (1479362400) ENGINE = InnoDB,
PARTITION p20161117 VALUES LESS THAN (1479448800) ENGINE = InnoDB,
PARTITION p20161118 VALUES LESS THAN (1479535200) ENGINE = InnoDB,
PARTITION p20161119 VALUES LESS THAN (1479621600) ENGINE = InnoDB,
PARTITION p20161120 VALUES LESS THAN (1479708000) ENGINE = InnoDB,
PARTITION p20161121 VALUES LESS THAN (1479794400) ENGINE = InnoDB,
PARTITION p20161122 VALUES LESS THAN (1479880800) ENGINE = InnoDB,
PARTITION p20161123 VALUES LESS THAN (1479967200) ENGINE = InnoDB,
PARTITION p20161124 VALUES LESS THAN (1480053600) ENGINE = InnoDB,
PARTITION p20161125 VALUES LESS THAN (1480140000) ENGINE = InnoDB,
PARTITION p20161126 VALUES LESS THAN (1480226400) ENGINE = InnoDB,
PARTITION p20161127 VALUES LESS THAN (1480312800) ENGINE = InnoDB,
PARTITION p20161128 VALUES LESS THAN (1480399200) ENGINE = InnoDB,
PARTITION p20161129 VALUES LESS THAN (1480485600) ENGINE = InnoDB) */
*************************** 1. row ***************************
history_uint
CREATE TABLE `history_uint` (
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`value` bigint(20) unsigned NOT NULL DEFAULT '0',
`ns` int(11) NOT NULL DEFAULT '0',
KEY `history_uint_1` (`itemid`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE ( clock)
(PARTITION p20161112 VALUES LESS THAN (1479099600) ENGINE = InnoDB,
PARTITION p20161113 VALUES LESS THAN (1479186000) ENGINE = InnoDB,
PARTITION p20161114 VALUES LESS THAN (1479272400) ENGINE = InnoDB,
PARTITION p20161115 VALUES LESS THAN (1479276000) ENGINE = InnoDB,
PARTITION p20161116 VALUES LESS THAN (1479362400) ENGINE = InnoDB,
PARTITION p20161117 VALUES LESS THAN (1479448800) ENGINE = InnoDB,
PARTITION p20161118 VALUES LESS THAN (1479535200) ENGINE = InnoDB,
PARTITION p20161119 VALUES LESS THAN (1479621600) ENGINE = InnoDB,
PARTITION p20161120 VALUES LESS THAN (1479708000) ENGINE = InnoDB,
PARTITION p20161121 VALUES LESS THAN (1479794400) ENGINE = InnoDB,
PARTITION p20161122 VALUES LESS THAN (1479880800) ENGINE = InnoDB,
PARTITION p20161123 VALUES LESS THAN (1479967200) ENGINE = InnoDB,
PARTITION p20161124 VALUES LESS THAN (1480053600) ENGINE = InnoDB,
PARTITION p20161125 VALUES LESS THAN (1480140000) ENGINE = InnoDB,
PARTITION p20161126 VALUES LESS THAN (1480226400) ENGINE = InnoDB,
PARTITION p20161127 VALUES LESS THAN (1480312800) ENGINE = InnoDB,
PARTITION p20161128 VALUES LESS THAN (1480399200) ENGINE = InnoDB,
PARTITION p20161129 VALUES LESS THAN (1480485600) ENGINE = InnoDB) */
*************************** 1. row ***************************
history_uint_sync
CREATE TABLE `history_uint_sync` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`nodeid` int(11) NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`value` bigint(20) unsigned NOT NULL DEFAULT '0',
`ns` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `history_uint_sync_1` (`nodeid`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
host_discovery
CREATE TABLE `host_discovery` (
`hostid` bigint(20) unsigned NOT NULL,
`parent_hostid` bigint(20) unsigned DEFAULT NULL,
`parent_itemid` bigint(20) unsigned DEFAULT NULL,
`host` varchar(64) NOT NULL DEFAULT '',
`lastcheck` int(11) NOT NULL DEFAULT '0',
`ts_delete` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`hostid`),
KEY `c_host_discovery_2` (`parent_hostid`),
KEY `c_host_discovery_3` (`parent_itemid`),
CONSTRAINT `c_host_discovery_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE,
CONSTRAINT `c_host_discovery_2` FOREIGN KEY (`parent_hostid`) REFERENCES `hosts` (`hostid`),
CONSTRAINT `c_host_discovery_3` FOREIGN KEY (`parent_itemid`) REFERENCES `items` (`itemid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
host_inventory
CREATE TABLE `host_inventory` (
`hostid` bigint(20) unsigned NOT NULL,
`inventory_mode` int(11) NOT NULL DEFAULT '0',
`type` varchar(64) NOT NULL DEFAULT '',
`type_full` varchar(64) NOT NULL DEFAULT '',
`name` varchar(64) NOT NULL DEFAULT '',
`alias` varchar(64) NOT NULL DEFAULT '',
`os` varchar(64) NOT NULL DEFAULT '',
`os_full` varchar(255) NOT NULL DEFAULT '',
`os_short` varchar(64) NOT NULL DEFAULT '',
`serialno_a` varchar(64) NOT NULL DEFAULT '',
`serialno_b` varchar(64) NOT NULL DEFAULT '',
`tag` varchar(64) NOT NULL DEFAULT '',
`asset_tag` varchar(64) NOT NULL DEFAULT '',
`macaddress_a` varchar(64) NOT NULL DEFAULT '',
`macaddress_b` varchar(64) NOT NULL DEFAULT '',
`hardware` varchar(255) NOT NULL DEFAULT '',
`hardware_full` text NOT NULL,
`software` varchar(255) NOT NULL DEFAULT '',
`software_full` text NOT NULL,
`software_app_a` varchar(64) NOT NULL DEFAULT '',
`software_app_b` varchar(64) NOT NULL DEFAULT '',
`software_app_c` varchar(64) NOT NULL DEFAULT '',
`software_app_d` varchar(64) NOT NULL DEFAULT '',
`software_app_e` varchar(64) NOT NULL DEFAULT '',
`contact` text NOT NULL,
`location` text NOT NULL,
`location_lat` varchar(16) NOT NULL DEFAULT '',
`location_lon` varchar(16) NOT NULL DEFAULT '',
`notes` text NOT NULL,
`chassis` varchar(64) NOT NULL DEFAULT '',
`model` varchar(64) NOT NULL DEFAULT '',
`hw_arch` varchar(32) NOT NULL DEFAULT '',
`vendor` varchar(64) NOT NULL DEFAULT '',
`contract_number` varchar(64) NOT NULL DEFAULT '',
`installer_name` varchar(64) NOT NULL DEFAULT '',
`deployment_status` varchar(64) NOT NULL DEFAULT '',
`url_a` varchar(255) NOT NULL DEFAULT '',
`url_b` varchar(255) NOT NULL DEFAULT '',
`url_c` varchar(255) NOT NULL DEFAULT '',
`host_networks` text NOT NULL,
`host_netmask` varchar(39) NOT NULL DEFAULT '',
`host_router` varchar(39) NOT NULL DEFAULT '',
`oob_ip` varchar(39) NOT NULL DEFAULT '',
`oob_netmask` varchar(39) NOT NULL DEFAULT '',
`oob_router` varchar(39) NOT NULL DEFAULT '',
`date_hw_purchase` varchar(64) NOT NULL DEFAULT '',
`date_hw_install` varchar(64) NOT NULL DEFAULT '',
`date_hw_expiry` varchar(64) NOT NULL DEFAULT '',
`date_hw_decomm` varchar(64) NOT NULL DEFAULT '',
`site_address_a` varchar(128) NOT NULL DEFAULT '',
`site_address_b` varchar(128) NOT NULL DEFAULT '',
`site_address_c` varchar(128) NOT NULL DEFAULT '',
`site_city` varchar(128) NOT NULL DEFAULT '',
`site_state` varchar(64) NOT NULL DEFAULT '',
`site_country` varchar(64) NOT NULL DEFAULT '',
`site_zip` varchar(64) NOT NULL DEFAULT '',
`site_rack` varchar(128) NOT NULL DEFAULT '',
`site_notes` text NOT NULL,
`poc_1_name` varchar(128) NOT NULL DEFAULT '',
`poc_1_email` varchar(128) NOT NULL DEFAULT '',
`poc_1_phone_a` varchar(64) NOT NULL DEFAULT '',
`poc_1_phone_b` varchar(64) NOT NULL DEFAULT '',
`poc_1_cell` varchar(64) NOT NULL DEFAULT '',
`poc_1_screen` varchar(64) NOT NULL DEFAULT '',
`poc_1_notes` text NOT NULL,
`poc_2_name` varchar(128) NOT NULL DEFAULT '',
`poc_2_email` varchar(128) NOT NULL DEFAULT '',
`poc_2_phone_a` varchar(64) NOT NULL DEFAULT '',
`poc_2_phone_b` varchar(64) NOT NULL DEFAULT '',
`poc_2_cell` varchar(64) NOT NULL DEFAULT '',
`poc_2_screen` varchar(64) NOT NULL DEFAULT '',
`poc_2_notes` text NOT NULL,
PRIMARY KEY (`hostid`),
CONSTRAINT `c_host_inventory_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
hostmacro
CREATE TABLE `hostmacro` (
`hostmacroid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
`macro` varchar(64) NOT NULL DEFAULT '',
`value` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`hostmacroid`),
UNIQUE KEY `hostmacro_1` (`hostid`,`macro`),
CONSTRAINT `c_hostmacro_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
hosts
CREATE TABLE `hosts` (
`hostid` bigint(20) unsigned NOT NULL,
`proxy_hostid` bigint(20) unsigned DEFAULT NULL,
`host` varchar(64) NOT NULL DEFAULT '',
`status` int(11) NOT NULL DEFAULT '0',
`disable_until` int(11) NOT NULL DEFAULT '0',
`error` varchar(128) NOT NULL DEFAULT '',
`available` int(11) NOT NULL DEFAULT '0',
`errors_from` int(11) NOT NULL DEFAULT '0',
`lastaccess` int(11) NOT NULL DEFAULT '0',
`ipmi_authtype` int(11) NOT NULL DEFAULT '0',
`ipmi_privilege` int(11) NOT NULL DEFAULT '2',
`ipmi_username` varchar(16) NOT NULL DEFAULT '',
`ipmi_password` varchar(20) NOT NULL DEFAULT '',
`ipmi_disable_until` int(11) NOT NULL DEFAULT '0',
`ipmi_available` int(11) NOT NULL DEFAULT '0',
`snmp_disable_until` int(11) NOT NULL DEFAULT '0',
`snmp_available` int(11) NOT NULL DEFAULT '0',
`maintenanceid` bigint(20) unsigned DEFAULT NULL,
`maintenance_status` int(11) NOT NULL DEFAULT '0',
`maintenance_type` int(11) NOT NULL DEFAULT '0',
`maintenance_from` int(11) NOT NULL DEFAULT '0',
`ipmi_errors_from` int(11) NOT NULL DEFAULT '0',
`snmp_errors_from` int(11) NOT NULL DEFAULT '0',
`ipmi_error` varchar(128) NOT NULL DEFAULT '',
`snmp_error` varchar(128) NOT NULL DEFAULT '',
`jmx_disable_until` int(11) NOT NULL DEFAULT '0',
`jmx_available` int(11) NOT NULL DEFAULT '0',
`jmx_errors_from` int(11) NOT NULL DEFAULT '0',
`jmx_error` varchar(128) NOT NULL DEFAULT '',
`name` varchar(64) NOT NULL DEFAULT '',
`flags` int(11) NOT NULL DEFAULT '0',
`templateid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`hostid`),
KEY `hosts_1` (`host`),
KEY `hosts_2` (`status`),
KEY `hosts_3` (`proxy_hostid`),
KEY `hosts_4` (`name`),
KEY `c_hosts_2` (`maintenanceid`),
KEY `hosts_5` (`maintenanceid`),
KEY `c_hosts_3` (`templateid`),
CONSTRAINT `c_hosts_1` FOREIGN KEY (`proxy_hostid`) REFERENCES `hosts` (`hostid`),
CONSTRAINT `c_hosts_2` FOREIGN KEY (`maintenanceid`) REFERENCES `maintenances` (`maintenanceid`),
CONSTRAINT `c_hosts_3` FOREIGN KEY (`templateid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
hosts_groups
CREATE TABLE `hosts_groups` (
`hostgroupid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
`groupid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`hostgroupid`),
UNIQUE KEY `hosts_groups_1` (`hostid`,`groupid`),
KEY `hosts_groups_2` (`groupid`),
CONSTRAINT `c_hosts_groups_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE,
CONSTRAINT `c_hosts_groups_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
hosts_templates
CREATE TABLE `hosts_templates` (
`hosttemplateid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
`templateid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`hosttemplateid`),
UNIQUE KEY `hosts_templates_1` (`hostid`,`templateid`),
KEY `hosts_templates_2` (`templateid`),
CONSTRAINT `c_hosts_templates_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE,
CONSTRAINT `c_hosts_templates_2` FOREIGN KEY (`templateid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
housekeeper
CREATE TABLE `housekeeper` (
`housekeeperid` bigint(20) unsigned NOT NULL,
`tablename` varchar(64) NOT NULL DEFAULT '',
`field` varchar(64) NOT NULL DEFAULT '',
`value` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`housekeeperid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
httpstep
CREATE TABLE `httpstep` (
`httpstepid` bigint(20) unsigned NOT NULL,
`httptestid` bigint(20) unsigned NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`no` int(11) NOT NULL DEFAULT '0',
`url` varchar(255) NOT NULL DEFAULT '',
`timeout` int(11) NOT NULL DEFAULT '30',
`posts` text NOT NULL,
`required` varchar(255) NOT NULL DEFAULT '',
`status_codes` varchar(255) NOT NULL DEFAULT '',
`variables` text NOT NULL,
PRIMARY KEY (`httpstepid`),
KEY `httpstep_1` (`httptestid`),
CONSTRAINT `c_httpstep_1` FOREIGN KEY (`httptestid`) REFERENCES `httptest` (`httptestid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
httpstepitem
CREATE TABLE `httpstepitem` (
`httpstepitemid` bigint(20) unsigned NOT NULL,
`httpstepid` bigint(20) unsigned NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`httpstepitemid`),
UNIQUE KEY `httpstepitem_1` (`httpstepid`,`itemid`),
KEY `c_httpstepitem_2` (`itemid`),
KEY `httpstepitem_2` (`itemid`),
CONSTRAINT `c_httpstepitem_1` FOREIGN KEY (`httpstepid`) REFERENCES `httpstep` (`httpstepid`) ON DELETE CASCADE,
CONSTRAINT `c_httpstepitem_2` FOREIGN KEY (`itemid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
httptest
CREATE TABLE `httptest` (
`httptestid` bigint(20) unsigned NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`applicationid` bigint(20) unsigned DEFAULT NULL,
`nextcheck` int(11) NOT NULL DEFAULT '0',
`delay` int(11) NOT NULL DEFAULT '60',
`status` int(11) NOT NULL DEFAULT '0',
`variables` text NOT NULL,
`agent` varchar(255) NOT NULL DEFAULT '',
`authentication` int(11) NOT NULL DEFAULT '0',
`http_user` varchar(64) NOT NULL DEFAULT '',
`http_password` varchar(64) NOT NULL DEFAULT '',
`hostid` bigint(20) unsigned NOT NULL,
`templateid` bigint(20) unsigned DEFAULT NULL,
`http_proxy` varchar(255) NOT NULL DEFAULT '',
`retries` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`httptestid`),
UNIQUE KEY `httptest_2` (`hostid`,`name`),
KEY `httptest_3` (`status`),
KEY `httptest_4` (`templateid`),
KEY `httptest_1` (`applicationid`),
CONSTRAINT `c_httptest_1` FOREIGN KEY (`applicationid`) REFERENCES `applications` (`applicationid`),
CONSTRAINT `c_httptest_2` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE,
CONSTRAINT `c_httptest_3` FOREIGN KEY (`templateid`) REFERENCES `httptest` (`httptestid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
httptestitem
CREATE TABLE `httptestitem` (
`httptestitemid` bigint(20) unsigned NOT NULL,
`httptestid` bigint(20) unsigned NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`httptestitemid`),
UNIQUE KEY `httptestitem_1` (`httptestid`,`itemid`),
KEY `c_httptestitem_2` (`itemid`),
KEY `httptestitem_2` (`itemid`),
CONSTRAINT `c_httptestitem_1` FOREIGN KEY (`httptestid`) REFERENCES `httptest` (`httptestid`) ON DELETE CASCADE,
CONSTRAINT `c_httptestitem_2` FOREIGN KEY (`itemid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
icon_map
CREATE TABLE `icon_map` (
`iconmapid` bigint(20) unsigned NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`default_iconid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`iconmapid`),
KEY `icon_map_1` (`name`),
KEY `c_icon_map_1` (`default_iconid`),
KEY `icon_map_2` (`default_iconid`),
CONSTRAINT `c_icon_map_1` FOREIGN KEY (`default_iconid`) REFERENCES `images` (`imageid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
icon_mapping
CREATE TABLE `icon_mapping` (
`iconmappingid` bigint(20) unsigned NOT NULL,
`iconmapid` bigint(20) unsigned NOT NULL,
`iconid` bigint(20) unsigned NOT NULL,
`inventory_link` int(11) NOT NULL DEFAULT '0',
`expression` varchar(64) NOT NULL DEFAULT '',
`sortorder` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`iconmappingid`),
KEY `icon_mapping_1` (`iconmapid`),
KEY `c_icon_mapping_2` (`iconid`),
KEY `icon_mapping_2` (`iconid`),
CONSTRAINT `c_icon_mapping_1` FOREIGN KEY (`iconmapid`) REFERENCES `icon_map` (`iconmapid`) ON DELETE CASCADE,
CONSTRAINT `c_icon_mapping_2` FOREIGN KEY (`iconid`) REFERENCES `images` (`imageid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
ids
CREATE TABLE `ids` (
`nodeid` int(11) NOT NULL,
`table_name` varchar(64) NOT NULL DEFAULT '',
`field_name` varchar(64) NOT NULL DEFAULT '',
`nextid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`nodeid`,`table_name`,`field_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
images
CREATE TABLE `images` (
`imageid` bigint(20) unsigned NOT NULL,
`imagetype` int(11) NOT NULL DEFAULT '0',
`name` varchar(64) NOT NULL DEFAULT '0',
`image` longblob NOT NULL,
PRIMARY KEY (`imageid`),
KEY `images_1` (`imagetype`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
interface
CREATE TABLE `interface` (
`interfaceid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
`main` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL DEFAULT '0',
`useip` int(11) NOT NULL DEFAULT '1',
`ip` varchar(64) NOT NULL DEFAULT '127.0.0.1',
`dns` varchar(64) NOT NULL DEFAULT '',
`port` varchar(64) NOT NULL DEFAULT '10050',
PRIMARY KEY (`interfaceid`),
KEY `interface_1` (`hostid`,`type`),
KEY `interface_2` (`ip`,`dns`),
CONSTRAINT `c_interface_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
interface_discovery
CREATE TABLE `interface_discovery` (
`interfaceid` bigint(20) unsigned NOT NULL,
`parent_interfaceid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`interfaceid`),
KEY `c_interface_discovery_2` (`parent_interfaceid`),
CONSTRAINT `c_interface_discovery_1` FOREIGN KEY (`interfaceid`) REFERENCES `interface` (`interfaceid`) ON DELETE CASCADE,
CONSTRAINT `c_interface_discovery_2` FOREIGN KEY (`parent_interfaceid`) REFERENCES `interface` (`interfaceid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
item_discovery
CREATE TABLE `item_discovery` (
`itemdiscoveryid` bigint(20) unsigned NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`parent_itemid` bigint(20) unsigned NOT NULL,
`key_` varchar(255) NOT NULL DEFAULT '',
`lastcheck` int(11) NOT NULL DEFAULT '0',
`ts_delete` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`itemdiscoveryid`),
UNIQUE KEY `item_discovery_1` (`itemid`,`parent_itemid`),
KEY `c_item_discovery_2` (`parent_itemid`),
KEY `item_discovery_2` (`parent_itemid`),
CONSTRAINT `c_item_discovery_1` FOREIGN KEY (`itemid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE,
CONSTRAINT `c_item_discovery_2` FOREIGN KEY (`parent_itemid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
items
CREATE TABLE `items` (
`itemid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`snmp_community` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`snmp_oid` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`hostid` bigint(20) unsigned NOT NULL,
`name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`key_` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`delay` int(11) NOT NULL DEFAULT '0',
`history` int(11) NOT NULL DEFAULT '90',
`trends` int(11) NOT NULL DEFAULT '365',
`status` int(11) NOT NULL DEFAULT '0',
`value_type` int(11) NOT NULL DEFAULT '0',
`trapper_hosts` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`units` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`multiplier` int(11) NOT NULL DEFAULT '0',
`delta` int(11) NOT NULL DEFAULT '0',
`snmpv3_securityname` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`snmpv3_securitylevel` int(11) NOT NULL DEFAULT '0',
`snmpv3_authpassphrase` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`snmpv3_privpassphrase` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`formula` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '1',
`error` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`lastlogsize` bigint(20) unsigned NOT NULL DEFAULT '0',
`logtimefmt` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`templateid` bigint(20) unsigned DEFAULT NULL,
`valuemapid` bigint(20) unsigned DEFAULT NULL,
`delay_flex` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`params` mediumtext COLLATE utf8_bin NOT NULL,
`ipmi_sensor` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`data_type` int(11) NOT NULL DEFAULT '0',
`authtype` int(11) NOT NULL DEFAULT '0',
`username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`password` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`publickey` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`privatekey` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`mtime` int(11) NOT NULL DEFAULT '0',
`flags` int(11) NOT NULL DEFAULT '0',
`filter` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`interfaceid` bigint(20) unsigned DEFAULT NULL,
`port` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`description` mediumtext COLLATE utf8_bin NOT NULL,
`inventory_link` int(11) NOT NULL DEFAULT '0',
`lifetime` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '30',
`snmpv3_authprotocol` int(11) NOT NULL DEFAULT '0',
`snmpv3_privprotocol` int(11) NOT NULL DEFAULT '0',
`state` int(11) NOT NULL DEFAULT '0',
`snmpv3_contextname` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
PRIMARY KEY (`itemid`),
UNIQUE KEY `items_1` (`hostid`,`key_`),
KEY `items_3` (`status`),
KEY `items_4` (`templateid`),
KEY `items_5` (`valuemapid`),
KEY `c_items_4` (`interfaceid`),
KEY `items_6` (`interfaceid`),
CONSTRAINT `c_items_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE,
CONSTRAINT `c_items_2` FOREIGN KEY (`templateid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE,
CONSTRAINT `c_items_3` FOREIGN KEY (`valuemapid`) REFERENCES `valuemaps` (`valuemapid`),
CONSTRAINT `c_items_4` FOREIGN KEY (`interfaceid`) REFERENCES `interface` (`interfaceid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
*************************** 1. row ***************************
items_applications
CREATE TABLE `items_applications` (
`itemappid` bigint(20) unsigned NOT NULL,
`applicationid` bigint(20) unsigned NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`itemappid`),
UNIQUE KEY `items_applications_1` (`applicationid`,`itemid`),
KEY `items_applications_2` (`itemid`),
CONSTRAINT `c_items_applications_1` FOREIGN KEY (`applicationid`) REFERENCES `applications` (`applicationid`) ON DELETE CASCADE,
CONSTRAINT `c_items_applications_2` FOREIGN KEY (`itemid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
items_lot
CREATE TABLE `items_lot` (
`itemid` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
itemsbackup11062014
CREATE TABLE `itemsbackup11062014` (
`itemid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`snmp_community` varchar(64) NOT NULL DEFAULT '',
`snmp_oid` varchar(255) NOT NULL DEFAULT '',
`hostid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`key_` varchar(255) NOT NULL DEFAULT '',
`delay` int(11) NOT NULL DEFAULT '0',
`history` int(11) NOT NULL DEFAULT '90',
`trends` int(11) NOT NULL DEFAULT '365',
`status` int(11) NOT NULL DEFAULT '0',
`value_type` int(11) NOT NULL DEFAULT '0',
`trapper_hosts` varchar(255) NOT NULL DEFAULT '',
`units` varchar(255) NOT NULL DEFAULT '',
`multiplier` int(11) NOT NULL DEFAULT '0',
`delta` int(11) NOT NULL DEFAULT '0',
`snmpv3_securityname` varchar(64) NOT NULL DEFAULT '',
`snmpv3_securitylevel` int(11) NOT NULL DEFAULT '0',
`snmpv3_authpassphrase` varchar(64) NOT NULL DEFAULT '',
`snmpv3_privpassphrase` varchar(64) NOT NULL DEFAULT '',
`formula` varchar(255) NOT NULL DEFAULT '1',
`error` varchar(128) NOT NULL DEFAULT '',
`lastlogsize` bigint(20) unsigned NOT NULL DEFAULT '0',
`logtimefmt` varchar(64) NOT NULL DEFAULT '',
`templateid` bigint(20) unsigned DEFAULT NULL,
`valuemapid` bigint(20) unsigned DEFAULT NULL,
`delay_flex` varchar(255) NOT NULL DEFAULT '',
`params` text NOT NULL,
`ipmi_sensor` varchar(128) NOT NULL DEFAULT '',
`data_type` int(11) NOT NULL DEFAULT '0',
`authtype` int(11) NOT NULL DEFAULT '0',
`username` varchar(64) NOT NULL DEFAULT '',
`password` varchar(64) NOT NULL DEFAULT '',
`publickey` varchar(64) NOT NULL DEFAULT '',
`privatekey` varchar(64) NOT NULL DEFAULT '',
`mtime` int(11) NOT NULL DEFAULT '0',
`flags` int(11) NOT NULL DEFAULT '0',
`filter` varchar(255) NOT NULL DEFAULT '',
`interfaceid` bigint(20) unsigned DEFAULT NULL,
`port` varchar(64) NOT NULL DEFAULT '',
`description` text NOT NULL,
`inventory_link` int(11) NOT NULL DEFAULT '0',
`lifetime` varchar(64) NOT NULL DEFAULT '30',
`snmpv3_authprotocol` int(11) NOT NULL DEFAULT '0',
`snmpv3_privprotocol` int(11) NOT NULL DEFAULT '0',
`state` int(11) NOT NULL DEFAULT '0',
`snmpv3_contextname` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`itemid`),
UNIQUE KEY `items_1` (`hostid`,`key_`),
KEY `items_3` (`status`),
KEY `items_4` (`templateid`),
KEY `items_5` (`valuemapid`),
KEY `c_items_4` (`interfaceid`),
KEY `items_6` (`interfaceid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
maintenances
CREATE TABLE `maintenances` (
`maintenanceid` bigint(20) unsigned NOT NULL,
`name` varchar(128) NOT NULL DEFAULT '',
`maintenance_type` int(11) NOT NULL DEFAULT '0',
`description` text NOT NULL,
`active_since` int(11) NOT NULL DEFAULT '0',
`active_till` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`maintenanceid`),
KEY `maintenances_1` (`active_since`,`active_till`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
maintenances_groups
CREATE TABLE `maintenances_groups` (
`maintenance_groupid` bigint(20) unsigned NOT NULL,
`maintenanceid` bigint(20) unsigned NOT NULL,
`groupid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`maintenance_groupid`),
UNIQUE KEY `maintenances_groups_1` (`maintenanceid`,`groupid`),
KEY `c_maintenances_groups_2` (`groupid`),
KEY `maintenances_groups_2` (`groupid`),
CONSTRAINT `c_maintenances_groups_1` FOREIGN KEY (`maintenanceid`) REFERENCES `maintenances` (`maintenanceid`) ON DELETE CASCADE,
CONSTRAINT `c_maintenances_groups_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
maintenances_hosts
CREATE TABLE `maintenances_hosts` (
`maintenance_hostid` bigint(20) unsigned NOT NULL,
`maintenanceid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`maintenance_hostid`),
UNIQUE KEY `maintenances_hosts_1` (`maintenanceid`,`hostid`),
KEY `c_maintenances_hosts_2` (`hostid`),
KEY `maintenances_hosts_2` (`hostid`),
CONSTRAINT `c_maintenances_hosts_1` FOREIGN KEY (`maintenanceid`) REFERENCES `maintenances` (`maintenanceid`) ON DELETE CASCADE,
CONSTRAINT `c_maintenances_hosts_2` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
maintenances_windows
CREATE TABLE `maintenances_windows` (
`maintenance_timeperiodid` bigint(20) unsigned NOT NULL,
`maintenanceid` bigint(20) unsigned NOT NULL,
`timeperiodid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`maintenance_timeperiodid`),
UNIQUE KEY `maintenances_windows_1` (`maintenanceid`,`timeperiodid`),
KEY `c_maintenances_windows_2` (`timeperiodid`),
KEY `maintenances_windows_2` (`timeperiodid`),
CONSTRAINT `c_maintenances_windows_1` FOREIGN KEY (`maintenanceid`) REFERENCES `maintenances` (`maintenanceid`) ON DELETE CASCADE,
CONSTRAINT `c_maintenances_windows_2` FOREIGN KEY (`timeperiodid`) REFERENCES `timeperiods` (`timeperiodid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
mappings
CREATE TABLE `mappings` (
`mappingid` bigint(20) unsigned NOT NULL,
`valuemapid` bigint(20) unsigned NOT NULL,
`value` varchar(64) NOT NULL DEFAULT '',
`newvalue` varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY (`mappingid`),
KEY `mappings_1` (`valuemapid`),
CONSTRAINT `c_mappings_1` FOREIGN KEY (`valuemapid`) REFERENCES `valuemaps` (`valuemapid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
media
CREATE TABLE `media` (
`mediaid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
`mediatypeid` bigint(20) unsigned NOT NULL,
`sendto` varchar(100) NOT NULL DEFAULT '',
`active` int(11) NOT NULL DEFAULT '0',
`severity` int(11) NOT NULL DEFAULT '63',
`period` varchar(100) NOT NULL DEFAULT '1-7,00:00-24:00',
PRIMARY KEY (`mediaid`),
KEY `media_1` (`userid`),
KEY `media_2` (`mediatypeid`),
CONSTRAINT `c_media_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE,
CONSTRAINT `c_media_2` FOREIGN KEY (`mediatypeid`) REFERENCES `media_type` (`mediatypeid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
media_type
CREATE TABLE `media_type` (
`mediatypeid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`description` varchar(100) NOT NULL DEFAULT '',
`smtp_server` varchar(255) NOT NULL DEFAULT '',
`smtp_helo` varchar(255) NOT NULL DEFAULT '',
`smtp_email` varchar(255) NOT NULL DEFAULT '',
`exec_path` varchar(255) NOT NULL DEFAULT '',
`gsm_modem` varchar(255) NOT NULL DEFAULT '',
`username` varchar(255) NOT NULL DEFAULT '',
`passwd` varchar(255) NOT NULL DEFAULT '',
`status` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`mediatypeid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
node_cksum
CREATE TABLE `node_cksum` (
`nodeid` int(11) NOT NULL,
`tablename` varchar(64) NOT NULL DEFAULT '',
`recordid` bigint(20) unsigned NOT NULL,
`cksumtype` int(11) NOT NULL DEFAULT '0',
`cksum` text NOT NULL,
`sync` char(128) NOT NULL DEFAULT '',
KEY `node_cksum_1` (`nodeid`,`cksumtype`,`tablename`,`recordid`),
CONSTRAINT `c_node_cksum_1` FOREIGN KEY (`nodeid`) REFERENCES `nodes` (`nodeid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
nodes
CREATE TABLE `nodes` (
`nodeid` int(11) NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '0',
`ip` varchar(39) NOT NULL DEFAULT '',
`port` int(11) NOT NULL DEFAULT '10051',
`nodetype` int(11) NOT NULL DEFAULT '0',
`masterid` int(11) DEFAULT NULL,
PRIMARY KEY (`nodeid`),
KEY `c_nodes_1` (`masterid`),
KEY `nodes_1` (`masterid`),
CONSTRAINT `c_nodes_1` FOREIGN KEY (`masterid`) REFERENCES `nodes` (`nodeid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
opcommand
CREATE TABLE `opcommand` (
`operationid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`scriptid` bigint(20) unsigned DEFAULT NULL,
`execute_on` int(11) NOT NULL DEFAULT '0',
`port` varchar(64) NOT NULL DEFAULT '',
`authtype` int(11) NOT NULL DEFAULT '0',
`username` varchar(64) NOT NULL DEFAULT '',
`password` varchar(64) NOT NULL DEFAULT '',
`publickey` varchar(64) NOT NULL DEFAULT '',
`privatekey` varchar(64) NOT NULL DEFAULT '',
`command` text NOT NULL,
PRIMARY KEY (`operationid`),
KEY `c_opcommand_2` (`scriptid`),
KEY `opcommand_1` (`scriptid`),
CONSTRAINT `c_opcommand_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE,
CONSTRAINT `c_opcommand_2` FOREIGN KEY (`scriptid`) REFERENCES `scripts` (`scriptid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
opcommand_grp
CREATE TABLE `opcommand_grp` (
`opcommand_grpid` bigint(20) unsigned NOT NULL,
`operationid` bigint(20) unsigned NOT NULL,
`groupid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`opcommand_grpid`),
KEY `opcommand_grp_1` (`operationid`),
KEY `c_opcommand_grp_2` (`groupid`),
KEY `opcommand_grp_2` (`groupid`),
CONSTRAINT `c_opcommand_grp_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE,
CONSTRAINT `c_opcommand_grp_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
opcommand_hst
CREATE TABLE `opcommand_hst` (
`opcommand_hstid` bigint(20) unsigned NOT NULL,
`operationid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`opcommand_hstid`),
KEY `opcommand_hst_1` (`operationid`),
KEY `c_opcommand_hst_2` (`hostid`),
KEY `opcommand_hst_2` (`hostid`),
CONSTRAINT `c_opcommand_hst_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE,
CONSTRAINT `c_opcommand_hst_2` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
opconditions
CREATE TABLE `opconditions` (
`opconditionid` bigint(20) unsigned NOT NULL,
`operationid` bigint(20) unsigned NOT NULL,
`conditiontype` int(11) NOT NULL DEFAULT '0',
`operator` int(11) NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`opconditionid`),
KEY `opconditions_1` (`operationid`),
CONSTRAINT `c_opconditions_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
operations
CREATE TABLE `operations` (
`operationid` bigint(20) unsigned NOT NULL,
`actionid` bigint(20) unsigned NOT NULL,
`operationtype` int(11) NOT NULL DEFAULT '0',
`esc_period` int(11) NOT NULL DEFAULT '0',
`esc_step_from` int(11) NOT NULL DEFAULT '1',
`esc_step_to` int(11) NOT NULL DEFAULT '1',
`evaltype` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`operationid`),
KEY `operations_1` (`actionid`),
CONSTRAINT `c_operations_1` FOREIGN KEY (`actionid`) REFERENCES `actions` (`actionid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
opgroup
CREATE TABLE `opgroup` (
`opgroupid` bigint(20) unsigned NOT NULL,
`operationid` bigint(20) unsigned NOT NULL,
`groupid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`opgroupid`),
UNIQUE KEY `opgroup_1` (`operationid`,`groupid`),
KEY `c_opgroup_2` (`groupid`),
KEY `opgroup_2` (`groupid`),
CONSTRAINT `c_opgroup_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE,
CONSTRAINT `c_opgroup_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
opmessage
CREATE TABLE `opmessage` (
`operationid` bigint(20) unsigned NOT NULL,
`default_msg` int(11) NOT NULL DEFAULT '0',
`subject` varchar(255) NOT NULL DEFAULT '',
`message` text NOT NULL,
`mediatypeid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`operationid`),
KEY `c_opmessage_2` (`mediatypeid`),
KEY `opmessage_1` (`mediatypeid`),
CONSTRAINT `c_opmessage_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE,
CONSTRAINT `c_opmessage_2` FOREIGN KEY (`mediatypeid`) REFERENCES `media_type` (`mediatypeid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
opmessage_grp
CREATE TABLE `opmessage_grp` (
`opmessage_grpid` bigint(20) unsigned NOT NULL,
`operationid` bigint(20) unsigned NOT NULL,
`usrgrpid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`opmessage_grpid`),
UNIQUE KEY `opmessage_grp_1` (`operationid`,`usrgrpid`),
KEY `c_opmessage_grp_2` (`usrgrpid`),
KEY `opmessage_grp_2` (`usrgrpid`),
CONSTRAINT `c_opmessage_grp_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE,
CONSTRAINT `c_opmessage_grp_2` FOREIGN KEY (`usrgrpid`) REFERENCES `usrgrp` (`usrgrpid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
opmessage_usr
CREATE TABLE `opmessage_usr` (
`opmessage_usrid` bigint(20) unsigned NOT NULL,
`operationid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`opmessage_usrid`),
UNIQUE KEY `opmessage_usr_1` (`operationid`,`userid`),
KEY `c_opmessage_usr_2` (`userid`),
KEY `opmessage_usr_2` (`userid`),
CONSTRAINT `c_opmessage_usr_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE,
CONSTRAINT `c_opmessage_usr_2` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
optemplate
CREATE TABLE `optemplate` (
`optemplateid` bigint(20) unsigned NOT NULL,
`operationid` bigint(20) unsigned NOT NULL,
`templateid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`optemplateid`),
UNIQUE KEY `optemplate_1` (`operationid`,`templateid`),
KEY `c_optemplate_2` (`templateid`),
KEY `optemplate_2` (`templateid`),
CONSTRAINT `c_optemplate_1` FOREIGN KEY (`operationid`) REFERENCES `operations` (`operationid`) ON DELETE CASCADE,
CONSTRAINT `c_optemplate_2` FOREIGN KEY (`templateid`) REFERENCES `hosts` (`hostid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
profiles
CREATE TABLE `profiles` (
`profileid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
`idx` varchar(96) NOT NULL DEFAULT '',
`idx2` bigint(20) unsigned NOT NULL DEFAULT '0',
`value_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`value_int` int(11) NOT NULL DEFAULT '0',
`value_str` varchar(255) NOT NULL DEFAULT '',
`source` varchar(96) NOT NULL DEFAULT '',
`type` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`profileid`),
KEY `profiles_1` (`userid`,`idx`,`idx2`),
KEY `profiles_2` (`userid`,`profileid`),
CONSTRAINT `c_profiles_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
proxy_autoreg_host
CREATE TABLE `proxy_autoreg_host` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`clock` int(11) NOT NULL DEFAULT '0',
`host` varchar(64) NOT NULL DEFAULT '',
`listen_ip` varchar(39) NOT NULL DEFAULT '',
`listen_port` int(11) NOT NULL DEFAULT '0',
`listen_dns` varchar(64) NOT NULL DEFAULT '',
`host_metadata` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `proxy_autoreg_host_1` (`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
proxy_dhistory
CREATE TABLE `proxy_dhistory` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`clock` int(11) NOT NULL DEFAULT '0',
`druleid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`ip` varchar(39) NOT NULL DEFAULT '',
`port` int(11) NOT NULL DEFAULT '0',
`key_` varchar(255) NOT NULL DEFAULT '',
`value` varchar(255) NOT NULL DEFAULT '',
`status` int(11) NOT NULL DEFAULT '0',
`dcheckid` bigint(20) unsigned DEFAULT NULL,
`dns` varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `proxy_dhistory_1` (`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
proxy_history
CREATE TABLE `proxy_history` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`timestamp` int(11) NOT NULL DEFAULT '0',
`source` varchar(64) NOT NULL DEFAULT '',
`severity` int(11) NOT NULL DEFAULT '0',
`value` longtext NOT NULL,
`logeventid` int(11) NOT NULL DEFAULT '0',
`ns` int(11) NOT NULL DEFAULT '0',
`state` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `proxy_history_1` (`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
regexps
CREATE TABLE `regexps` (
`regexpid` bigint(20) unsigned NOT NULL,
`name` varchar(128) NOT NULL DEFAULT '',
`test_string` text NOT NULL,
PRIMARY KEY (`regexpid`),
KEY `regexps_1` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
rights
CREATE TABLE `rights` (
`rightid` bigint(20) unsigned NOT NULL,
`groupid` bigint(20) unsigned NOT NULL,
`permission` int(11) NOT NULL DEFAULT '0',
`id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`rightid`),
KEY `rights_1` (`groupid`),
KEY `rights_2` (`id`),
CONSTRAINT `c_rights_1` FOREIGN KEY (`groupid`) REFERENCES `usrgrp` (`usrgrpid`) ON DELETE CASCADE,
CONSTRAINT `c_rights_2` FOREIGN KEY (`id`) REFERENCES `groups` (`groupid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
screens
CREATE TABLE `screens` (
`screenid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`hsize` int(11) NOT NULL DEFAULT '1',
`vsize` int(11) NOT NULL DEFAULT '1',
`templateid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`screenid`),
KEY `c_screens_1` (`templateid`),
KEY `screens_1` (`templateid`),
CONSTRAINT `c_screens_1` FOREIGN KEY (`templateid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
screens_items
CREATE TABLE `screens_items` (
`screenitemid` bigint(20) unsigned NOT NULL,
`screenid` bigint(20) unsigned NOT NULL,
`resourcetype` int(11) NOT NULL DEFAULT '0',
`resourceid` bigint(20) unsigned NOT NULL DEFAULT '0',
`width` int(11) NOT NULL DEFAULT '320',
`height` int(11) NOT NULL DEFAULT '200',
`x` int(11) NOT NULL DEFAULT '0',
`y` int(11) NOT NULL DEFAULT '0',
`colspan` int(11) NOT NULL DEFAULT '0',
`rowspan` int(11) NOT NULL DEFAULT '0',
`elements` int(11) NOT NULL DEFAULT '25',
`valign` int(11) NOT NULL DEFAULT '0',
`halign` int(11) NOT NULL DEFAULT '0',
`style` int(11) NOT NULL DEFAULT '0',
`url` varchar(255) NOT NULL DEFAULT '',
`dynamic` int(11) NOT NULL DEFAULT '0',
`sort_triggers` int(11) NOT NULL DEFAULT '0',
`application` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`screenitemid`),
KEY `c_screens_items_1` (`screenid`),
KEY `screens_items_1` (`screenid`),
CONSTRAINT `c_screens_items_1` FOREIGN KEY (`screenid`) REFERENCES `screens` (`screenid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
scripts
CREATE TABLE `scripts` (
`scriptid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`command` varchar(255) NOT NULL DEFAULT '',
`host_access` int(11) NOT NULL DEFAULT '2',
`usrgrpid` bigint(20) unsigned DEFAULT NULL,
`groupid` bigint(20) unsigned DEFAULT NULL,
`description` text NOT NULL,
`confirmation` varchar(255) NOT NULL DEFAULT '',
`type` int(11) NOT NULL DEFAULT '0',
`execute_on` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`scriptid`),
KEY `c_scripts_1` (`usrgrpid`),
KEY `c_scripts_2` (`groupid`),
KEY `scripts_1` (`usrgrpid`),
KEY `scripts_2` (`groupid`),
CONSTRAINT `c_scripts_1` FOREIGN KEY (`usrgrpid`) REFERENCES `usrgrp` (`usrgrpid`),
CONSTRAINT `c_scripts_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
service_alarms
CREATE TABLE `service_alarms` (
`servicealarmid` bigint(20) unsigned NOT NULL,
`serviceid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`value` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`servicealarmid`),
KEY `service_alarms_1` (`serviceid`,`clock`),
KEY `service_alarms_2` (`clock`),
CONSTRAINT `c_service_alarms_1` FOREIGN KEY (`serviceid`) REFERENCES `services` (`serviceid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
services
CREATE TABLE `services` (
`serviceid` bigint(20) unsigned NOT NULL,
`name` varchar(128) NOT NULL DEFAULT '',
`status` int(11) NOT NULL DEFAULT '0',
`algorithm` int(11) NOT NULL DEFAULT '0',
`triggerid` bigint(20) unsigned DEFAULT NULL,
`showsla` int(11) NOT NULL DEFAULT '0',
`goodsla` double(16,4) NOT NULL DEFAULT '99.9000',
`sortorder` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`serviceid`),
KEY `services_1` (`triggerid`),
CONSTRAINT `c_services_1` FOREIGN KEY (`triggerid`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
services_links
CREATE TABLE `services_links` (
`linkid` bigint(20) unsigned NOT NULL,
`serviceupid` bigint(20) unsigned NOT NULL,
`servicedownid` bigint(20) unsigned NOT NULL,
`soft` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`linkid`),
UNIQUE KEY `services_links_2` (`serviceupid`,`servicedownid`),
KEY `services_links_1` (`servicedownid`),
CONSTRAINT `c_services_links_1` FOREIGN KEY (`serviceupid`) REFERENCES `services` (`serviceid`) ON DELETE CASCADE,
CONSTRAINT `c_services_links_2` FOREIGN KEY (`servicedownid`) REFERENCES `services` (`serviceid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
services_times
CREATE TABLE `services_times` (
`timeid` bigint(20) unsigned NOT NULL,
`serviceid` bigint(20) unsigned NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`ts_from` int(11) NOT NULL DEFAULT '0',
`ts_to` int(11) NOT NULL DEFAULT '0',
`note` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`timeid`),
KEY `services_times_1` (`serviceid`,`type`,`ts_from`,`ts_to`),
CONSTRAINT `c_services_times_1` FOREIGN KEY (`serviceid`) REFERENCES `services` (`serviceid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
sessions
CREATE TABLE `sessions` (
`sessionid` varchar(32) NOT NULL DEFAULT '',
`userid` bigint(20) unsigned NOT NULL,
`lastaccess` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`sessionid`),
KEY `sessions_1` (`userid`,`status`),
CONSTRAINT `c_sessions_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
slides
CREATE TABLE `slides` (
`slideid` bigint(20) unsigned NOT NULL,
`slideshowid` bigint(20) unsigned NOT NULL,
`screenid` bigint(20) unsigned NOT NULL,
`step` int(11) NOT NULL DEFAULT '0',
`delay` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`slideid`),
KEY `c_slides_2` (`screenid`),
KEY `slides_2` (`screenid`),
KEY `slides_1` (`slideshowid`),
CONSTRAINT `c_slides_1` FOREIGN KEY (`slideshowid`) REFERENCES `slideshows` (`slideshowid`) ON DELETE CASCADE,
CONSTRAINT `c_slides_2` FOREIGN KEY (`screenid`) REFERENCES `screens` (`screenid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
slideshows
CREATE TABLE `slideshows` (
`slideshowid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`delay` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`slideshowid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
sysmap_element_url
CREATE TABLE `sysmap_element_url` (
`sysmapelementurlid` bigint(20) unsigned NOT NULL,
`selementid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`sysmapelementurlid`),
UNIQUE KEY `sysmap_element_url_1` (`selementid`,`name`),
CONSTRAINT `c_sysmap_element_url_1` FOREIGN KEY (`selementid`) REFERENCES `sysmaps_elements` (`selementid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
sysmap_url
CREATE TABLE `sysmap_url` (
`sysmapurlid` bigint(20) unsigned NOT NULL,
`sysmapid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL DEFAULT '',
`elementtype` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`sysmapurlid`),
UNIQUE KEY `sysmap_url_1` (`sysmapid`,`name`),
CONSTRAINT `c_sysmap_url_1` FOREIGN KEY (`sysmapid`) REFERENCES `sysmaps` (`sysmapid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
sysmaps
CREATE TABLE `sysmaps` (
`sysmapid` bigint(20) unsigned NOT NULL,
`name` varchar(128) NOT NULL DEFAULT '',
`width` int(11) NOT NULL DEFAULT '600',
`height` int(11) NOT NULL DEFAULT '400',
`backgroundid` bigint(20) unsigned DEFAULT NULL,
`label_type` int(11) NOT NULL DEFAULT '2',
`label_location` int(11) NOT NULL DEFAULT '0',
`highlight` int(11) NOT NULL DEFAULT '1',
`expandproblem` int(11) NOT NULL DEFAULT '1',
`markelements` int(11) NOT NULL DEFAULT '0',
`show_unack` int(11) NOT NULL DEFAULT '0',
`grid_size` int(11) NOT NULL DEFAULT '50',
`grid_show` int(11) NOT NULL DEFAULT '1',
`grid_align` int(11) NOT NULL DEFAULT '1',
`label_format` int(11) NOT NULL DEFAULT '0',
`label_type_host` int(11) NOT NULL DEFAULT '2',
`label_type_hostgroup` int(11) NOT NULL DEFAULT '2',
`label_type_trigger` int(11) NOT NULL DEFAULT '2',
`label_type_map` int(11) NOT NULL DEFAULT '2',
`label_type_image` int(11) NOT NULL DEFAULT '2',
`label_string_host` varchar(255) NOT NULL DEFAULT '',
`label_string_hostgroup` varchar(255) NOT NULL DEFAULT '',
`label_string_trigger` varchar(255) NOT NULL DEFAULT '',
`label_string_map` varchar(255) NOT NULL DEFAULT '',
`label_string_image` varchar(255) NOT NULL DEFAULT '',
`iconmapid` bigint(20) unsigned DEFAULT NULL,
`expand_macros` int(11) NOT NULL DEFAULT '0',
`severity_min` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`sysmapid`),
KEY `sysmaps_1` (`name`),
KEY `c_sysmaps_1` (`backgroundid`),
KEY `c_sysmaps_2` (`iconmapid`),
KEY `sysmaps_2` (`backgroundid`),
KEY `sysmaps_3` (`iconmapid`),
CONSTRAINT `c_sysmaps_1` FOREIGN KEY (`backgroundid`) REFERENCES `images` (`imageid`),
CONSTRAINT `c_sysmaps_2` FOREIGN KEY (`iconmapid`) REFERENCES `icon_map` (`iconmapid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
sysmaps_elements
CREATE TABLE `sysmaps_elements` (
`selementid` bigint(20) unsigned NOT NULL,
`sysmapid` bigint(20) unsigned NOT NULL,
`elementid` bigint(20) unsigned NOT NULL DEFAULT '0',
`elementtype` int(11) NOT NULL DEFAULT '0',
`iconid_off` bigint(20) unsigned DEFAULT NULL,
`iconid_on` bigint(20) unsigned DEFAULT NULL,
`label` varchar(2048) NOT NULL DEFAULT '',
`label_location` int(11) NOT NULL DEFAULT '-1',
`x` int(11) NOT NULL DEFAULT '0',
`y` int(11) NOT NULL DEFAULT '0',
`iconid_disabled` bigint(20) unsigned DEFAULT NULL,
`iconid_maintenance` bigint(20) unsigned DEFAULT NULL,
`elementsubtype` int(11) NOT NULL DEFAULT '0',
`areatype` int(11) NOT NULL DEFAULT '0',
`width` int(11) NOT NULL DEFAULT '200',
`height` int(11) NOT NULL DEFAULT '200',
`viewtype` int(11) NOT NULL DEFAULT '0',
`use_iconmap` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`selementid`),
KEY `c_sysmaps_elements_1` (`sysmapid`),
KEY `c_sysmaps_elements_2` (`iconid_off`),
KEY `c_sysmaps_elements_3` (`iconid_on`),
KEY `c_sysmaps_elements_4` (`iconid_disabled`),
KEY `c_sysmaps_elements_5` (`iconid_maintenance`),
KEY `sysmaps_elements_1` (`sysmapid`),
KEY `sysmaps_elements_2` (`iconid_off`),
KEY `sysmaps_elements_3` (`iconid_on`),
KEY `sysmaps_elements_4` (`iconid_disabled`),
KEY `sysmaps_elements_5` (`iconid_maintenance`),
CONSTRAINT `c_sysmaps_elements_1` FOREIGN KEY (`sysmapid`) REFERENCES `sysmaps` (`sysmapid`) ON DELETE CASCADE,
CONSTRAINT `c_sysmaps_elements_2` FOREIGN KEY (`iconid_off`) REFERENCES `images` (`imageid`),
CONSTRAINT `c_sysmaps_elements_3` FOREIGN KEY (`iconid_on`) REFERENCES `images` (`imageid`),
CONSTRAINT `c_sysmaps_elements_4` FOREIGN KEY (`iconid_disabled`) REFERENCES `images` (`imageid`),
CONSTRAINT `c_sysmaps_elements_5` FOREIGN KEY (`iconid_maintenance`) REFERENCES `images` (`imageid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
sysmaps_link_triggers
CREATE TABLE `sysmaps_link_triggers` (
`linktriggerid` bigint(20) unsigned NOT NULL,
`linkid` bigint(20) unsigned NOT NULL,
`triggerid` bigint(20) unsigned NOT NULL,
`drawtype` int(11) NOT NULL DEFAULT '0',
`color` varchar(6) NOT NULL DEFAULT '000000',
PRIMARY KEY (`linktriggerid`),
UNIQUE KEY `sysmaps_link_triggers_1` (`linkid`,`triggerid`),
KEY `c_sysmaps_link_triggers_2` (`triggerid`),
KEY `sysmaps_link_triggers_2` (`triggerid`),
CONSTRAINT `c_sysmaps_link_triggers_1` FOREIGN KEY (`linkid`) REFERENCES `sysmaps_links` (`linkid`) ON DELETE CASCADE,
CONSTRAINT `c_sysmaps_link_triggers_2` FOREIGN KEY (`triggerid`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
sysmaps_links
CREATE TABLE `sysmaps_links` (
`linkid` bigint(20) unsigned NOT NULL,
`sysmapid` bigint(20) unsigned NOT NULL,
`selementid1` bigint(20) unsigned NOT NULL,
`selementid2` bigint(20) unsigned NOT NULL,
`drawtype` int(11) NOT NULL DEFAULT '0',
`color` varchar(6) NOT NULL DEFAULT '000000',
`label` varchar(2048) NOT NULL DEFAULT '',
PRIMARY KEY (`linkid`),
KEY `c_sysmaps_links_1` (`sysmapid`),
KEY `c_sysmaps_links_2` (`selementid1`),
KEY `c_sysmaps_links_3` (`selementid2`),
KEY `sysmaps_links_1` (`sysmapid`),
KEY `sysmaps_links_2` (`selementid1`),
KEY `sysmaps_links_3` (`selementid2`),
CONSTRAINT `c_sysmaps_links_1` FOREIGN KEY (`sysmapid`) REFERENCES `sysmaps` (`sysmapid`) ON DELETE CASCADE,
CONSTRAINT `c_sysmaps_links_2` FOREIGN KEY (`selementid1`) REFERENCES `sysmaps_elements` (`selementid`) ON DELETE CASCADE,
CONSTRAINT `c_sysmaps_links_3` FOREIGN KEY (`selementid2`) REFERENCES `sysmaps_elements` (`selementid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
timeperiods
CREATE TABLE `timeperiods` (
`timeperiodid` bigint(20) unsigned NOT NULL,
`timeperiod_type` int(11) NOT NULL DEFAULT '0',
`every` int(11) NOT NULL DEFAULT '0',
`month` int(11) NOT NULL DEFAULT '0',
`dayofweek` int(11) NOT NULL DEFAULT '0',
`day` int(11) NOT NULL DEFAULT '0',
`start_time` int(11) NOT NULL DEFAULT '0',
`period` int(11) NOT NULL DEFAULT '0',
`start_date` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`timeperiodid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
trends
CREATE TABLE `trends` (
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`num` int(11) NOT NULL DEFAULT '0',
`value_min` double(16,4) NOT NULL DEFAULT '0.0000',
`value_avg` double(16,4) NOT NULL DEFAULT '0.0000',
`value_max` double(16,4) NOT NULL DEFAULT '0.0000',
PRIMARY KEY (`itemid`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE ( clock)
(PARTITION p20151121 VALUES LESS THAN (1448172000) ENGINE = InnoDB,
PARTITION p20151122 VALUES LESS THAN (1448258400) ENGINE = InnoDB,
PARTITION p20151123 VALUES LESS THAN (1448344800) ENGINE = InnoDB,
PARTITION p20151124 VALUES LESS THAN (1448431200) ENGINE = InnoDB,
PARTITION p20151125 VALUES LESS THAN (1448517600) ENGINE = InnoDB,
PARTITION p20151126 VALUES LESS THAN (1448604000) ENGINE = InnoDB,
PARTITION p20151127 VALUES LESS THAN (1448690400) ENGINE = InnoDB,
PARTITION p20151128 VALUES LESS THAN (1448776800) ENGINE = InnoDB,
PARTITION p20151129 VALUES LESS THAN (1448863200) ENGINE = InnoDB,
PARTITION p20151130 VALUES LESS THAN (1448949600) ENGINE = InnoDB,
PARTITION p20151201 VALUES LESS THAN (1449036000) ENGINE = InnoDB,
PARTITION p20151202 VALUES LESS THAN (1449122400) ENGINE = InnoDB,
PARTITION p20151203 VALUES LESS THAN (1449208800) ENGINE = InnoDB,
PARTITION p20151204 VALUES LESS THAN (1449295200) ENGINE = InnoDB,
PARTITION p20151205 VALUES LESS THAN (1449381600) ENGINE = InnoDB,
PARTITION p20151206 VALUES LESS THAN (1449468000) ENGINE = InnoDB,
PARTITION p20151207 VALUES LESS THAN (1449554400) ENGINE = InnoDB,
PARTITION p20151208 VALUES LESS THAN (1449640800) ENGINE = InnoDB,
PARTITION p20151209 VALUES LESS THAN (1449727200) ENGINE = InnoDB,
PARTITION p20151210 VALUES LESS THAN (1449813600) ENGINE = InnoDB,
PARTITION p20151211 VALUES LESS THAN (1449900000) ENGINE = InnoDB,
PARTITION p20151212 VALUES LESS THAN (1449986400) ENGINE = InnoDB,
PARTITION p20151213 VALUES LESS THAN (1450072800) ENGINE = InnoDB,
PARTITION p20151214 VALUES LESS THAN (1450159200) ENGINE = InnoDB,
PARTITION p20151215 VALUES LESS THAN (1450245600) ENGINE = InnoDB,
PARTITION p20151216 VALUES LESS THAN (1450332000) ENGINE = InnoDB,
PARTITION p20151217 VALUES LESS THAN (1450418400) ENGINE = InnoDB,
PARTITION p20151218 VALUES LESS THAN (1450504800) ENGINE = InnoDB,
PARTITION p20151219 VALUES LESS THAN (1450591200) ENGINE = InnoDB,
PARTITION p20151220 VALUES LESS THAN (1450677600) ENGINE = InnoDB,
PARTITION p20151221 VALUES LESS THAN (1450764000) ENGINE = InnoDB,
PARTITION p20151222 VALUES LESS THAN (1450850400) ENGINE = InnoDB,
PARTITION p20151223 VALUES LESS THAN (1450936800) ENGINE = InnoDB,
PARTITION p20151224 VALUES LESS THAN (1451023200) ENGINE = InnoDB,
PARTITION p20151225 VALUES LESS THAN (1451109600) ENGINE = InnoDB,
PARTITION p20151226 VALUES LESS THAN (1451196000) ENGINE = InnoDB,
PARTITION p20151227 VALUES LESS THAN (1451282400) ENGINE = InnoDB,
PARTITION p20151228 VALUES LESS THAN (1451368800) ENGINE = InnoDB,
PARTITION p20151229 VALUES LESS THAN (1451455200) ENGINE = InnoDB,
PARTITION p20151230 VALUES LESS THAN (1451541600) ENGINE = InnoDB,
PARTITION p20151231 VALUES LESS THAN (1451628000) ENGINE = InnoDB,
PARTITION p20160101 VALUES LESS THAN (1451714400) ENGINE = InnoDB,
PARTITION p20160102 VALUES LESS THAN (1451800800) ENGINE = InnoDB,
PARTITION p20160103 VALUES LESS THAN (1451887200) ENGINE = InnoDB,
PARTITION p20160104 VALUES LESS THAN (1451973600) ENGINE = InnoDB,
PARTITION p20160105 VALUES LESS THAN (1452060000) ENGINE = InnoDB,
PARTITION p20160106 VALUES LESS THAN (1452146400) ENGINE = InnoDB,
PARTITION p20160107 VALUES LESS THAN (1452232800) ENGINE = InnoDB,
PARTITION p20160108 VALUES LESS THAN (1452319200) ENGINE = InnoDB,
PARTITION p20160109 VALUES LESS THAN (1452405600) ENGINE = InnoDB,
PARTITION p20160110 VALUES LESS THAN (1452492000) ENGINE = InnoDB,
PARTITION p20160111 VALUES LESS THAN (1452578400) ENGINE = InnoDB,
PARTITION p20160112 VALUES LESS THAN (1452664800) ENGINE = InnoDB,
PARTITION p20160113 VALUES LESS THAN (1452751200) ENGINE = InnoDB,
PARTITION p20160114 VALUES LESS THAN (1452837600) ENGINE = InnoDB,
PARTITION p20160115 VALUES LESS THAN (1452924000) ENGINE = InnoDB,
PARTITION p20160116 VALUES LESS THAN (1453010400) ENGINE = InnoDB,
PARTITION p20160117 VALUES LESS THAN (1453096800) ENGINE = InnoDB,
PARTITION p20160118 VALUES LESS THAN (1453183200) ENGINE = InnoDB,
PARTITION p20160119 VALUES LESS THAN (1453269600) ENGINE = InnoDB,
PARTITION p20160120 VALUES LESS THAN (1453356000) ENGINE = InnoDB,
PARTITION p20160121 VALUES LESS THAN (1453442400) ENGINE = InnoDB,
PARTITION p20160122 VALUES LESS THAN (1453528800) ENGINE = InnoDB,
PARTITION p20160123 VALUES LESS THAN (1453615200) ENGINE = InnoDB,
PARTITION p20160124 VALUES LESS THAN (1453701600) ENGINE = InnoDB,
PARTITION p20160125 VALUES LESS THAN (1453788000) ENGINE = InnoDB,
PARTITION p20160126 VALUES LESS THAN (1453874400) ENGINE = InnoDB,
PARTITION p20160127 VALUES LESS THAN (1453960800) ENGINE = InnoDB,
PARTITION p20160128 VALUES LESS THAN (1454047200) ENGINE = InnoDB,
PARTITION p20160129 VALUES LESS THAN (1454133600) ENGINE = InnoDB,
PARTITION p20160130 VALUES LESS THAN (1454220000) ENGINE = InnoDB,
PARTITION p20160131 VALUES LESS THAN (1454306400) ENGINE = InnoDB,
PARTITION p20160201 VALUES LESS THAN (1454392800) ENGINE = InnoDB,
PARTITION p20160202 VALUES LESS THAN (1454479200) ENGINE = InnoDB,
PARTITION p20160203 VALUES LESS THAN (1454565600) ENGINE = InnoDB,
PARTITION p20160204 VALUES LESS THAN (1454652000) ENGINE = InnoDB,
PARTITION p20160205 VALUES LESS THAN (1454738400) ENGINE = InnoDB,
PARTITION p20160206 VALUES LESS THAN (1454824800) ENGINE = InnoDB,
PARTITION p20160207 VALUES LESS THAN (1454911200) ENGINE = InnoDB,
PARTITION p20160208 VALUES LESS THAN (1454997600) ENGINE = InnoDB,
PARTITION p20160209 VALUES LESS THAN (1455084000) ENGINE = InnoDB,
PARTITION p20160210 VALUES LESS THAN (1455170400) ENGINE = InnoDB,
PARTITION p20160211 VALUES LESS THAN (1455256800) ENGINE = InnoDB,
PARTITION p20160212 VALUES LESS THAN (1455343200) ENGINE = InnoDB,
PARTITION p20160213 VALUES LESS THAN (1455429600) ENGINE = InnoDB,
PARTITION p20160214 VALUES LESS THAN (1455516000) ENGINE = InnoDB,
PARTITION p20160215 VALUES LESS THAN (1455602400) ENGINE = InnoDB,
PARTITION p20160216 VALUES LESS THAN (1455688800) ENGINE = InnoDB,
PARTITION p20160217 VALUES LESS THAN (1455775200) ENGINE = InnoDB,
PARTITION p20160218 VALUES LESS THAN (1455861600) ENGINE = InnoDB,
PARTITION p20160219 VALUES LESS THAN (1455948000) ENGINE = InnoDB,
PARTITION p20160220 VALUES LESS THAN (1456034400) ENGINE = InnoDB,
PARTITION p20160221 VALUES LESS THAN (1456120800) ENGINE = InnoDB,
PARTITION p20160222 VALUES LESS THAN (1456207200) ENGINE = InnoDB,
PARTITION p20160223 VALUES LESS THAN (1456293600) ENGINE = InnoDB,
PARTITION p20160224 VALUES LESS THAN (1456380000) ENGINE = InnoDB,
PARTITION p20160225 VALUES LESS THAN (1456466400) ENGINE = InnoDB,
PARTITION p20160226 VALUES LESS THAN (1456552800) ENGINE = InnoDB,
PARTITION p20160227 VALUES LESS THAN (1456639200) ENGINE = InnoDB,
PARTITION p20160228 VALUES LESS THAN (1456725600) ENGINE = InnoDB,
PARTITION p20160229 VALUES LESS THAN (1456812000) ENGINE = InnoDB,
PARTITION p20160301 VALUES LESS THAN (1456898400) ENGINE = InnoDB,
PARTITION p20160302 VALUES LESS THAN (1456984800) ENGINE = InnoDB,
PARTITION p20160303 VALUES LESS THAN (1457071200) ENGINE = InnoDB,
PARTITION p20160304 VALUES LESS THAN (1457157600) ENGINE = InnoDB,
PARTITION p20160305 VALUES LESS THAN (1457244000) ENGINE = InnoDB,
PARTITION p20160306 VALUES LESS THAN (1457330400) ENGINE = InnoDB,
PARTITION p20160307 VALUES LESS THAN (1457416800) ENGINE = InnoDB,
PARTITION p20160308 VALUES LESS THAN (1457503200) ENGINE = InnoDB,
PARTITION p20160309 VALUES LESS THAN (1457589600) ENGINE = InnoDB,
PARTITION p20160310 VALUES LESS THAN (1457676000) ENGINE = InnoDB,
PARTITION p20160311 VALUES LESS THAN (1457762400) ENGINE = InnoDB,
PARTITION p20160312 VALUES LESS THAN (1457848800) ENGINE = InnoDB,
PARTITION p20160313 VALUES LESS THAN (1457931600) ENGINE = InnoDB,
PARTITION p20160314 VALUES LESS THAN (1458018000) ENGINE = InnoDB,
PARTITION p20160315 VALUES LESS THAN (1458104400) ENGINE = InnoDB,
PARTITION p20160316 VALUES LESS THAN (1458190800) ENGINE = InnoDB,
PARTITION p20160317 VALUES LESS THAN (1458277200) ENGINE = InnoDB,
PARTITION p20160318 VALUES LESS THAN (1458363600) ENGINE = InnoDB,
PARTITION p20160319 VALUES LESS THAN (1458450000) ENGINE = InnoDB,
PARTITION p20160320 VALUES LESS THAN (1458536400) ENGINE = InnoDB,
PARTITION p20160321 VALUES LESS THAN (1458622800) ENGINE = InnoDB,
PARTITION p20160322 VALUES LESS THAN (1458709200) ENGINE = InnoDB,
PARTITION p20160323 VALUES LESS THAN (1458795600) ENGINE = InnoDB,
PARTITION p20160324 VALUES LESS THAN (1458882000) ENGINE = InnoDB,
PARTITION p20160325 VALUES LESS THAN (1458968400) ENGINE = InnoDB,
PARTITION p20160326 VALUES LESS THAN (1459054800) ENGINE = InnoDB,
PARTITION p20160327 VALUES LESS THAN (1459141200) ENGINE = InnoDB,
PARTITION p20160328 VALUES LESS THAN (1459227600) ENGINE = InnoDB,
PARTITION p20160329 VALUES LESS THAN (1459314000) ENGINE = InnoDB,
PARTITION p20160330 VALUES LESS THAN (1459400400) ENGINE = InnoDB,
PARTITION p20160331 VALUES LESS THAN (1459486800) ENGINE = InnoDB,
PARTITION p20160401 VALUES LESS THAN (1459573200) ENGINE = InnoDB,
PARTITION p20160402 VALUES LESS THAN (1459659600) ENGINE = InnoDB,
PARTITION p20160403 VALUES LESS THAN (1459746000) ENGINE = InnoDB,
PARTITION p20160404 VALUES LESS THAN (1459832400) ENGINE = InnoDB,
PARTITION p20160405 VALUES LESS THAN (1459918800) ENGINE = InnoDB,
PARTITION p20160406 VALUES LESS THAN (1460005200) ENGINE = InnoDB,
PARTITION p20160407 VALUES LESS THAN (1460091600) ENGINE = InnoDB,
PARTITION p20160408 VALUES LESS THAN (1460178000) ENGINE = InnoDB,
PARTITION p20160409 VALUES LESS THAN (1460264400) ENGINE = InnoDB,
PARTITION p20160410 VALUES LESS THAN (1460350800) ENGINE = InnoDB,
PARTITION p20160411 VALUES LESS THAN (1460437200) ENGINE = InnoDB,
PARTITION p20160412 VALUES LESS THAN (1460523600) ENGINE = InnoDB,
PARTITION p20160413 VALUES LESS THAN (1460610000) ENGINE = InnoDB,
PARTITION p20160414 VALUES LESS THAN (1460696400) ENGINE = InnoDB,
PARTITION p20160415 VALUES LESS THAN (1460782800) ENGINE = InnoDB,
PARTITION p20160416 VALUES LESS THAN (1460869200) ENGINE = InnoDB,
PARTITION p20160417 VALUES LESS THAN (1460955600) ENGINE = InnoDB,
PARTITION p20160418 VALUES LESS THAN (1461042000) ENGINE = InnoDB,
PARTITION p20160419 VALUES LESS THAN (1461128400) ENGINE = InnoDB,
PARTITION p20160420 VALUES LESS THAN (1461214800) ENGINE = InnoDB,
PARTITION p20160421 VALUES LESS THAN (1461301200) ENGINE = InnoDB,
PARTITION p20160422 VALUES LESS THAN (1461387600) ENGINE = InnoDB,
PARTITION p20160423 VALUES LESS THAN (1461474000) ENGINE = InnoDB,
PARTITION p20160424 VALUES LESS THAN (1461560400) ENGINE = InnoDB,
PARTITION p20160425 VALUES LESS THAN (1461646800) ENGINE = InnoDB,
PARTITION p20160426 VALUES LESS THAN (1461733200) ENGINE = InnoDB,
PARTITION p20160427 VALUES LESS THAN (1461819600) ENGINE = InnoDB,
PARTITION p20160428 VALUES LESS THAN (1461906000) ENGINE = InnoDB,
PARTITION p20160429 VALUES LESS THAN (1461992400) ENGINE = InnoDB,
PARTITION p20160430 VALUES LESS THAN (1462078800) ENGINE = InnoDB,
PARTITION p20160501 VALUES LESS THAN (1462165200) ENGINE = InnoDB,
PARTITION p20160502 VALUES LESS THAN (1462251600) ENGINE = InnoDB,
PARTITION p20160503 VALUES LESS THAN (1462338000) ENGINE = InnoDB,
PARTITION p20160504 VALUES LESS THAN (1462424400) ENGINE = InnoDB,
PARTITION p20160505 VALUES LESS THAN (1462510800) ENGINE = InnoDB,
PARTITION p20160506 VALUES LESS THAN (1462597200) ENGINE = InnoDB,
PARTITION p20160507 VALUES LESS THAN (1462683600) ENGINE = InnoDB,
PARTITION p20160508 VALUES LESS THAN (1462770000) ENGINE = InnoDB,
PARTITION p20160509 VALUES LESS THAN (1462856400) ENGINE = InnoDB,
PARTITION p20160510 VALUES LESS THAN (1462942800) ENGINE = InnoDB,
PARTITION p20160511 VALUES LESS THAN (1463029200) ENGINE = InnoDB,
PARTITION p20160512 VALUES LESS THAN (1463115600) ENGINE = InnoDB,
PARTITION p20160513 VALUES LESS THAN (1463202000) ENGINE = InnoDB,
PARTITION p20160514 VALUES LESS THAN (1463288400) ENGINE = InnoDB,
PARTITION p20160515 VALUES LESS THAN (1463374800) ENGINE = InnoDB,
PARTITION p20160516 VALUES LESS THAN (1463461200) ENGINE = InnoDB,
PARTITION p20160517 VALUES LESS THAN (1463547600) ENGINE = InnoDB,
PARTITION p20160518 VALUES LESS THAN (1463634000) ENGINE = InnoDB,
PARTITION p20160519 VALUES LESS THAN (1463720400) ENGINE = InnoDB,
PARTITION p20160520 VALUES LESS THAN (1463806800) ENGINE = InnoDB,
PARTITION p20160521 VALUES LESS THAN (1463893200) ENGINE = InnoDB,
PARTITION p20160522 VALUES LESS THAN (1463979600) ENGINE = InnoDB,
PARTITION p20160523 VALUES LESS THAN (1464066000) ENGINE = InnoDB,
PARTITION p20160524 VALUES LESS THAN (1464152400) ENGINE = InnoDB,
PARTITION p20160525 VALUES LESS THAN (1464238800) ENGINE = InnoDB,
PARTITION p20160526 VALUES LESS THAN (1464325200) ENGINE = InnoDB,
PARTITION p20160527 VALUES LESS THAN (1464411600) ENGINE = InnoDB,
PARTITION p20160528 VALUES LESS THAN (1464498000) ENGINE = InnoDB,
PARTITION p20160529 VALUES LESS THAN (1464584400) ENGINE = InnoDB,
PARTITION p20160530 VALUES LESS THAN (1464670800) ENGINE = InnoDB,
PARTITION p20160531 VALUES LESS THAN (1464757200) ENGINE = InnoDB,
PARTITION p20160601 VALUES LESS THAN (1464843600) ENGINE = InnoDB,
PARTITION p20160602 VALUES LESS THAN (1464930000) ENGINE = InnoDB,
PARTITION p20160603 VALUES LESS THAN (1465016400) ENGINE = InnoDB,
PARTITION p20160604 VALUES LESS THAN (1465102800) ENGINE = InnoDB,
PARTITION p20160605 VALUES LESS THAN (1465189200) ENGINE = InnoDB,
PARTITION p20160606 VALUES LESS THAN (1465275600) ENGINE = InnoDB,
PARTITION p20160607 VALUES LESS THAN (1465362000) ENGINE = InnoDB,
PARTITION p20160608 VALUES LESS THAN (1465448400) ENGINE = InnoDB,
PARTITION p20160609 VALUES LESS THAN (1465534800) ENGINE = InnoDB,
PARTITION p20160610 VALUES LESS THAN (1465621200) ENGINE = InnoDB,
PARTITION p20160611 VALUES LESS THAN (1465707600) ENGINE = InnoDB,
PARTITION p20160612 VALUES LESS THAN (1465794000) ENGINE = InnoDB,
PARTITION p20160613 VALUES LESS THAN (1465880400) ENGINE = InnoDB,
PARTITION p20160614 VALUES LESS THAN (1465966800) ENGINE = InnoDB,
PARTITION p20160615 VALUES LESS THAN (1466053200) ENGINE = InnoDB,
PARTITION p20160616 VALUES LESS THAN (1466139600) ENGINE = InnoDB,
PARTITION p20160617 VALUES LESS THAN (1466226000) ENGINE = InnoDB,
PARTITION p20160618 VALUES LESS THAN (1466312400) ENGINE = InnoDB,
PARTITION p20160619 VALUES LESS THAN (1466398800) ENGINE = InnoDB,
PARTITION p20160620 VALUES LESS THAN (1466485200) ENGINE = InnoDB,
PARTITION p20160621 VALUES LESS THAN (1466571600) ENGINE = InnoDB,
PARTITION p20160622 VALUES LESS THAN (1466658000) ENGINE = InnoDB,
PARTITION p20160623 VALUES LESS THAN (1466744400) ENGINE = InnoDB,
PARTITION p20160624 VALUES LESS THAN (1466830800) ENGINE = InnoDB,
PARTITION p20160625 VALUES LESS THAN (1466917200) ENGINE = InnoDB,
PARTITION p20160626 VALUES LESS THAN (1467003600) ENGINE = InnoDB,
PARTITION p20160627 VALUES LESS THAN (1467090000) ENGINE = InnoDB,
PARTITION p20160628 VALUES LESS THAN (1467176400) ENGINE = InnoDB,
PARTITION p20160629 VALUES LESS THAN (1467262800) ENGINE = InnoDB,
PARTITION p20160630 VALUES LESS THAN (1467349200) ENGINE = InnoDB,
PARTITION p20160701 VALUES LESS THAN (1467435600) ENGINE = InnoDB,
PARTITION p20160702 VALUES LESS THAN (1467522000) ENGINE = InnoDB,
PARTITION p20160703 VALUES LESS THAN (1467608400) ENGINE = InnoDB,
PARTITION p20160704 VALUES LESS THAN (1467694800) ENGINE = InnoDB,
PARTITION p20160705 VALUES LESS THAN (1467781200) ENGINE = InnoDB,
PARTITION p20160706 VALUES LESS THAN (1467867600) ENGINE = InnoDB,
PARTITION p20160707 VALUES LESS THAN (1467954000) ENGINE = InnoDB,
PARTITION p20160708 VALUES LESS THAN (1468040400) ENGINE = InnoDB,
PARTITION p20160709 VALUES LESS THAN (1468126800) ENGINE = InnoDB,
PARTITION p20160710 VALUES LESS THAN (1468213200) ENGINE = InnoDB,
PARTITION p20160711 VALUES LESS THAN (1468299600) ENGINE = InnoDB,
PARTITION p20160712 VALUES LESS THAN (1468386000) ENGINE = InnoDB,
PARTITION p20160713 VALUES LESS THAN (1468472400) ENGINE = InnoDB,
PARTITION p20160714 VALUES LESS THAN (1468558800) ENGINE = InnoDB,
PARTITION p20160715 VALUES LESS THAN (1468645200) ENGINE = InnoDB,
PARTITION p20160716 VALUES LESS THAN (1468731600) ENGINE = InnoDB,
PARTITION p20160717 VALUES LESS THAN (1468818000) ENGINE = InnoDB,
PARTITION p20160718 VALUES LESS THAN (1468904400) ENGINE = InnoDB,
PARTITION p20160719 VALUES LESS THAN (1468990800) ENGINE = InnoDB,
PARTITION p20160720 VALUES LESS THAN (1469077200) ENGINE = InnoDB,
PARTITION p20160721 VALUES LESS THAN (1469163600) ENGINE = InnoDB,
PARTITION p20160722 VALUES LESS THAN (1469250000) ENGINE = InnoDB,
PARTITION p20160723 VALUES LESS THAN (1469336400) ENGINE = InnoDB,
PARTITION p20160724 VALUES LESS THAN (1469422800) ENGINE = InnoDB,
PARTITION p20160725 VALUES LESS THAN (1469509200) ENGINE = InnoDB,
PARTITION p20160726 VALUES LESS THAN (1469595600) ENGINE = InnoDB,
PARTITION p20160727 VALUES LESS THAN (1469682000) ENGINE = InnoDB,
PARTITION p20160728 VALUES LESS THAN (1469768400) ENGINE = InnoDB,
PARTITION p20160729 VALUES LESS THAN (1469854800) ENGINE = InnoDB,
PARTITION p20160730 VALUES LESS THAN (1469941200) ENGINE = InnoDB,
PARTITION p20160731 VALUES LESS THAN (1470027600) ENGINE = InnoDB,
PARTITION p20160801 VALUES LESS THAN (1470114000) ENGINE = InnoDB,
PARTITION p20160802 VALUES LESS THAN (1470200400) ENGINE = InnoDB,
PARTITION p20160803 VALUES LESS THAN (1470286800) ENGINE = InnoDB,
PARTITION p20160804 VALUES LESS THAN (1470373200) ENGINE = InnoDB,
PARTITION p20160805 VALUES LESS THAN (1470459600) ENGINE = InnoDB,
PARTITION p20160806 VALUES LESS THAN (1470546000) ENGINE = InnoDB,
PARTITION p20160807 VALUES LESS THAN (1470632400) ENGINE = InnoDB,
PARTITION p20160808 VALUES LESS THAN (1470718800) ENGINE = InnoDB,
PARTITION p20160809 VALUES LESS THAN (1470805200) ENGINE = InnoDB,
PARTITION p20160810 VALUES LESS THAN (1470891600) ENGINE = InnoDB,
PARTITION p20160811 VALUES LESS THAN (1470978000) ENGINE = InnoDB,
PARTITION p20160812 VALUES LESS THAN (1471064400) ENGINE = InnoDB,
PARTITION p20160813 VALUES LESS THAN (1471150800) ENGINE = InnoDB,
PARTITION p20160814 VALUES LESS THAN (1471237200) ENGINE = InnoDB,
PARTITION p20160815 VALUES LESS THAN (1471323600) ENGINE = InnoDB,
PARTITION p20160816 VALUES LESS THAN (1471410000) ENGINE = InnoDB,
PARTITION p20160817 VALUES LESS THAN (1471496400) ENGINE = InnoDB,
PARTITION p20160818 VALUES LESS THAN (1471582800) ENGINE = InnoDB,
PARTITION p20160819 VALUES LESS THAN (1471669200) ENGINE = InnoDB,
PARTITION p20160820 VALUES LESS THAN (1471755600) ENGINE = InnoDB,
PARTITION p20160821 VALUES LESS THAN (1471842000) ENGINE = InnoDB,
PARTITION p20160822 VALUES LESS THAN (1471928400) ENGINE = InnoDB,
PARTITION p20160823 VALUES LESS THAN (1472014800) ENGINE = InnoDB,
PARTITION p20160824 VALUES LESS THAN (1472101200) ENGINE = InnoDB,
PARTITION p20160825 VALUES LESS THAN (1472187600) ENGINE = InnoDB,
PARTITION p20160826 VALUES LESS THAN (1472274000) ENGINE = InnoDB,
PARTITION p20160827 VALUES LESS THAN (1472360400) ENGINE = InnoDB,
PARTITION p20160828 VALUES LESS THAN (1472446800) ENGINE = InnoDB,
PARTITION p20160829 VALUES LESS THAN (1472533200) ENGINE = InnoDB,
PARTITION p20160830 VALUES LESS THAN (1472619600) ENGINE = InnoDB,
PARTITION p20160831 VALUES LESS THAN (1472706000) ENGINE = InnoDB,
PARTITION p20160901 VALUES LESS THAN (1472792400) ENGINE = InnoDB,
PARTITION p20160902 VALUES LESS THAN (1472878800) ENGINE = InnoDB,
PARTITION p20160903 VALUES LESS THAN (1472965200) ENGINE = InnoDB,
PARTITION p20160904 VALUES LESS THAN (1473051600) ENGINE = InnoDB,
PARTITION p20160905 VALUES LESS THAN (1473138000) ENGINE = InnoDB,
PARTITION p20160906 VALUES LESS THAN (1473224400) ENGINE = InnoDB,
PARTITION p20160907 VALUES LESS THAN (1473310800) ENGINE = InnoDB,
PARTITION p20160908 VALUES LESS THAN (1473397200) ENGINE = InnoDB,
PARTITION p20160909 VALUES LESS THAN (1473483600) ENGINE = InnoDB,
PARTITION p20160910 VALUES LESS THAN (1473570000) ENGINE = InnoDB,
PARTITION p20160911 VALUES LESS THAN (1473656400) ENGINE = InnoDB,
PARTITION p20160912 VALUES LESS THAN (1473742800) ENGINE = InnoDB,
PARTITION p20160913 VALUES LESS THAN (1473829200) ENGINE = InnoDB,
PARTITION p20160914 VALUES LESS THAN (1473915600) ENGINE = InnoDB,
PARTITION p20160915 VALUES LESS THAN (1474002000) ENGINE = InnoDB,
PARTITION p20160916 VALUES LESS THAN (1474088400) ENGINE = InnoDB,
PARTITION p20160917 VALUES LESS THAN (1474174800) ENGINE = InnoDB,
PARTITION p20160918 VALUES LESS THAN (1474261200) ENGINE = InnoDB,
PARTITION p20160919 VALUES LESS THAN (1474347600) ENGINE = InnoDB,
PARTITION p20160920 VALUES LESS THAN (1474434000) ENGINE = InnoDB,
PARTITION p20160921 VALUES LESS THAN (1474520400) ENGINE = InnoDB,
PARTITION p20160922 VALUES LESS THAN (1474606800) ENGINE = InnoDB,
PARTITION p20160923 VALUES LESS THAN (1474693200) ENGINE = InnoDB,
PARTITION p20160924 VALUES LESS THAN (1474779600) ENGINE = InnoDB,
PARTITION p20160925 VALUES LESS THAN (1474866000) ENGINE = InnoDB,
PARTITION p20160926 VALUES LESS THAN (1474952400) ENGINE = InnoDB,
PARTITION p20160927 VALUES LESS THAN (1475038800) ENGINE = InnoDB,
PARTITION p20160928 VALUES LESS THAN (1475125200) ENGINE = InnoDB,
PARTITION p20160929 VALUES LESS THAN (1475211600) ENGINE = InnoDB,
PARTITION p20160930 VALUES LESS THAN (1475298000) ENGINE = InnoDB,
PARTITION p20161001 VALUES LESS THAN (1475384400) ENGINE = InnoDB,
PARTITION p20161002 VALUES LESS THAN (1475470800) ENGINE = InnoDB,
PARTITION p20161003 VALUES LESS THAN (1475557200) ENGINE = InnoDB,
PARTITION p20161004 VALUES LESS THAN (1475643600) ENGINE = InnoDB,
PARTITION p20161005 VALUES LESS THAN (1475730000) ENGINE = InnoDB,
PARTITION p20161006 VALUES LESS THAN (1475816400) ENGINE = InnoDB,
PARTITION p20161007 VALUES LESS THAN (1475902800) ENGINE = InnoDB,
PARTITION p20161008 VALUES LESS THAN (1475989200) ENGINE = InnoDB,
PARTITION p20161009 VALUES LESS THAN (1476075600) ENGINE = InnoDB,
PARTITION p20161010 VALUES LESS THAN (1476162000) ENGINE = InnoDB,
PARTITION p20161011 VALUES LESS THAN (1476248400) ENGINE = InnoDB,
PARTITION p20161012 VALUES LESS THAN (1476334800) ENGINE = InnoDB,
PARTITION p20161013 VALUES LESS THAN (1476421200) ENGINE = InnoDB,
PARTITION p20161014 VALUES LESS THAN (1476507600) ENGINE = InnoDB,
PARTITION p20161015 VALUES LESS THAN (1476594000) ENGINE = InnoDB,
PARTITION p20161016 VALUES LESS THAN (1476680400) ENGINE = InnoDB,
PARTITION p20161017 VALUES LESS THAN (1476766800) ENGINE = InnoDB,
PARTITION p20161018 VALUES LESS THAN (1476853200) ENGINE = InnoDB,
PARTITION p20161019 VALUES LESS THAN (1476939600) ENGINE = InnoDB,
PARTITION p20161020 VALUES LESS THAN (1477026000) ENGINE = InnoDB,
PARTITION p20161021 VALUES LESS THAN (1477112400) ENGINE = InnoDB,
PARTITION p20161022 VALUES LESS THAN (1477198800) ENGINE = InnoDB,
PARTITION p20161023 VALUES LESS THAN (1477285200) ENGINE = InnoDB,
PARTITION p20161024 VALUES LESS THAN (1477371600) ENGINE = InnoDB,
PARTITION p20161025 VALUES LESS THAN (1477458000) ENGINE = InnoDB,
PARTITION p20161026 VALUES LESS THAN (1477544400) ENGINE = InnoDB,
PARTITION p20161027 VALUES LESS THAN (1477630800) ENGINE = InnoDB,
PARTITION p20161028 VALUES LESS THAN (1477717200) ENGINE = InnoDB,
PARTITION p20161029 VALUES LESS THAN (1477803600) ENGINE = InnoDB,
PARTITION p20161030 VALUES LESS THAN (1477890000) ENGINE = InnoDB,
PARTITION p20161031 VALUES LESS THAN (1477976400) ENGINE = InnoDB,
PARTITION p20161101 VALUES LESS THAN (1478062800) ENGINE = InnoDB,
PARTITION p20161102 VALUES LESS THAN (1478149200) ENGINE = InnoDB,
PARTITION p20161103 VALUES LESS THAN (1478235600) ENGINE = InnoDB,
PARTITION p20161104 VALUES LESS THAN (1478322000) ENGINE = InnoDB,
PARTITION p20161105 VALUES LESS THAN (1478408400) ENGINE = InnoDB,
PARTITION p20161106 VALUES LESS THAN (1478494800) ENGINE = InnoDB,
PARTITION p20161107 VALUES LESS THAN (1478667600) ENGINE = InnoDB,
PARTITION p20161108 VALUES LESS THAN (1478754000) ENGINE = InnoDB,
PARTITION p20161109 VALUES LESS THAN (1478840400) ENGINE = InnoDB,
PARTITION p20161110 VALUES LESS THAN (1478926800) ENGINE = InnoDB,
PARTITION p20161111 VALUES LESS THAN (1479013200) ENGINE = InnoDB,
PARTITION p20161112 VALUES LESS THAN (1479099600) ENGINE = InnoDB,
PARTITION p20161113 VALUES LESS THAN (1479186000) ENGINE = InnoDB,
PARTITION p20161114 VALUES LESS THAN (1479272400) ENGINE = InnoDB,
PARTITION p20161115 VALUES LESS THAN (1479276000) ENGINE = InnoDB,
PARTITION p20161116 VALUES LESS THAN (1479362400) ENGINE = InnoDB,
PARTITION p20161117 VALUES LESS THAN (1479448800) ENGINE = InnoDB,
PARTITION p20161118 VALUES LESS THAN (1479535200) ENGINE = InnoDB,
PARTITION p20161119 VALUES LESS THAN (1479621600) ENGINE = InnoDB,
PARTITION p20161120 VALUES LESS THAN (1479708000) ENGINE = InnoDB,
PARTITION p20161121 VALUES LESS THAN (1479794400) ENGINE = InnoDB,
PARTITION p20161122 VALUES LESS THAN (1479880800) ENGINE = InnoDB,
PARTITION p20161123 VALUES LESS THAN (1479967200) ENGINE = InnoDB,
PARTITION p20161124 VALUES LESS THAN (1480053600) ENGINE = InnoDB,
PARTITION p20161125 VALUES LESS THAN (1480140000) ENGINE = InnoDB,
PARTITION p20161126 VALUES LESS THAN (1480226400) ENGINE = InnoDB,
PARTITION p20161127 VALUES LESS THAN (1480312800) ENGINE = InnoDB,
PARTITION p20161128 VALUES LESS THAN (1480399200) ENGINE = InnoDB,
PARTITION p20161129 VALUES LESS THAN (1480485600) ENGINE = InnoDB) */
*************************** 1. row ***************************
trends_uint
CREATE TABLE `trends_uint` (
`itemid` bigint(20) unsigned NOT NULL,
`clock` int(11) NOT NULL DEFAULT '0',
`num` int(11) NOT NULL DEFAULT '0',
`value_min` bigint(20) unsigned NOT NULL DEFAULT '0',
`value_avg` bigint(20) unsigned NOT NULL DEFAULT '0',
`value_max` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemid`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE ( clock)
(PARTITION p20151121 VALUES LESS THAN (1448172000) ENGINE = InnoDB,
PARTITION p20151122 VALUES LESS THAN (1448258400) ENGINE = InnoDB,
PARTITION p20151123 VALUES LESS THAN (1448344800) ENGINE = InnoDB,
PARTITION p20151124 VALUES LESS THAN (1448431200) ENGINE = InnoDB,
PARTITION p20151125 VALUES LESS THAN (1448517600) ENGINE = InnoDB,
PARTITION p20151126 VALUES LESS THAN (1448604000) ENGINE = InnoDB,
PARTITION p20151127 VALUES LESS THAN (1448690400) ENGINE = InnoDB,
PARTITION p20151128 VALUES LESS THAN (1448776800) ENGINE = InnoDB,
PARTITION p20151129 VALUES LESS THAN (1448863200) ENGINE = InnoDB,
PARTITION p20151130 VALUES LESS THAN (1448949600) ENGINE = InnoDB,
PARTITION p20151201 VALUES LESS THAN (1449036000) ENGINE = InnoDB,
PARTITION p20151202 VALUES LESS THAN (1449122400) ENGINE = InnoDB,
PARTITION p20151203 VALUES LESS THAN (1449208800) ENGINE = InnoDB,
PARTITION p20151204 VALUES LESS THAN (1449295200) ENGINE = InnoDB,
PARTITION p20151205 VALUES LESS THAN (1449381600) ENGINE = InnoDB,
PARTITION p20151206 VALUES LESS THAN (1449468000) ENGINE = InnoDB,
PARTITION p20151207 VALUES LESS THAN (1449554400) ENGINE = InnoDB,
PARTITION p20151208 VALUES LESS THAN (1449640800) ENGINE = InnoDB,
PARTITION p20151209 VALUES LESS THAN (1449727200) ENGINE = InnoDB,
PARTITION p20151210 VALUES LESS THAN (1449813600) ENGINE = InnoDB,
PARTITION p20151211 VALUES LESS THAN (1449900000) ENGINE = InnoDB,
PARTITION p20151212 VALUES LESS THAN (1449986400) ENGINE = InnoDB,
PARTITION p20151213 VALUES LESS THAN (1450072800) ENGINE = InnoDB,
PARTITION p20151214 VALUES LESS THAN (1450159200) ENGINE = InnoDB,
PARTITION p20151215 VALUES LESS THAN (1450245600) ENGINE = InnoDB,
PARTITION p20151216 VALUES LESS THAN (1450332000) ENGINE = InnoDB,
PARTITION p20151217 VALUES LESS THAN (1450418400) ENGINE = InnoDB,
PARTITION p20151218 VALUES LESS THAN (1450504800) ENGINE = InnoDB,
PARTITION p20151219 VALUES LESS THAN (1450591200) ENGINE = InnoDB,
PARTITION p20151220 VALUES LESS THAN (1450677600) ENGINE = InnoDB,
PARTITION p20151221 VALUES LESS THAN (1450764000) ENGINE = InnoDB,
PARTITION p20151222 VALUES LESS THAN (1450850400) ENGINE = InnoDB,
PARTITION p20151223 VALUES LESS THAN (1450936800) ENGINE = InnoDB,
PARTITION p20151224 VALUES LESS THAN (1451023200) ENGINE = InnoDB,
PARTITION p20151225 VALUES LESS THAN (1451109600) ENGINE = InnoDB,
PARTITION p20151226 VALUES LESS THAN (1451196000) ENGINE = InnoDB,
PARTITION p20151227 VALUES LESS THAN (1451282400) ENGINE = InnoDB,
PARTITION p20151228 VALUES LESS THAN (1451368800) ENGINE = InnoDB,
PARTITION p20151229 VALUES LESS THAN (1451455200) ENGINE = InnoDB,
PARTITION p20151230 VALUES LESS THAN (1451541600) ENGINE = InnoDB,
PARTITION p20151231 VALUES LESS THAN (1451628000) ENGINE = InnoDB,
PARTITION p20160101 VALUES LESS THAN (1451714400) ENGINE = InnoDB,
PARTITION p20160102 VALUES LESS THAN (1451800800) ENGINE = InnoDB,
PARTITION p20160103 VALUES LESS THAN (1451887200) ENGINE = InnoDB,
PARTITION p20160104 VALUES LESS THAN (1451973600) ENGINE = InnoDB,
PARTITION p20160105 VALUES LESS THAN (1452060000) ENGINE = InnoDB,
PARTITION p20160106 VALUES LESS THAN (1452146400) ENGINE = InnoDB,
PARTITION p20160107 VALUES LESS THAN (1452232800) ENGINE = InnoDB,
PARTITION p20160108 VALUES LESS THAN (1452319200) ENGINE = InnoDB,
PARTITION p20160109 VALUES LESS THAN (1452405600) ENGINE = InnoDB,
PARTITION p20160110 VALUES LESS THAN (1452492000) ENGINE = InnoDB,
PARTITION p20160111 VALUES LESS THAN (1452578400) ENGINE = InnoDB,
PARTITION p20160112 VALUES LESS THAN (1452664800) ENGINE = InnoDB,
PARTITION p20160113 VALUES LESS THAN (1452751200) ENGINE = InnoDB,
PARTITION p20160114 VALUES LESS THAN (1452837600) ENGINE = InnoDB,
PARTITION p20160115 VALUES LESS THAN (1452924000) ENGINE = InnoDB,
PARTITION p20160116 VALUES LESS THAN (1453010400) ENGINE = InnoDB,
PARTITION p20160117 VALUES LESS THAN (1453096800) ENGINE = InnoDB,
PARTITION p20160118 VALUES LESS THAN (1453183200) ENGINE = InnoDB,
PARTITION p20160119 VALUES LESS THAN (1453269600) ENGINE = InnoDB,
PARTITION p20160120 VALUES LESS THAN (1453356000) ENGINE = InnoDB,
PARTITION p20160121 VALUES LESS THAN (1453442400) ENGINE = InnoDB,
PARTITION p20160122 VALUES LESS THAN (1453528800) ENGINE = InnoDB,
PARTITION p20160123 VALUES LESS THAN (1453615200) ENGINE = InnoDB,
PARTITION p20160124 VALUES LESS THAN (1453701600) ENGINE = InnoDB,
PARTITION p20160125 VALUES LESS THAN (1453788000) ENGINE = InnoDB,
PARTITION p20160126 VALUES LESS THAN (1453874400) ENGINE = InnoDB,
PARTITION p20160127 VALUES LESS THAN (1453960800) ENGINE = InnoDB,
PARTITION p20160128 VALUES LESS THAN (1454047200) ENGINE = InnoDB,
PARTITION p20160129 VALUES LESS THAN (1454133600) ENGINE = InnoDB,
PARTITION p20160130 VALUES LESS THAN (1454220000) ENGINE = InnoDB,
PARTITION p20160131 VALUES LESS THAN (1454306400) ENGINE = InnoDB,
PARTITION p20160201 VALUES LESS THAN (1454392800) ENGINE = InnoDB,
PARTITION p20160202 VALUES LESS THAN (1454479200) ENGINE = InnoDB,
PARTITION p20160203 VALUES LESS THAN (1454565600) ENGINE = InnoDB,
PARTITION p20160204 VALUES LESS THAN (1454652000) ENGINE = InnoDB,
PARTITION p20160205 VALUES LESS THAN (1454738400) ENGINE = InnoDB,
PARTITION p20160206 VALUES LESS THAN (1454824800) ENGINE = InnoDB,
PARTITION p20160207 VALUES LESS THAN (1454911200) ENGINE = InnoDB,
PARTITION p20160208 VALUES LESS THAN (1454997600) ENGINE = InnoDB,
PARTITION p20160209 VALUES LESS THAN (1455084000) ENGINE = InnoDB,
PARTITION p20160210 VALUES LESS THAN (1455170400) ENGINE = InnoDB,
PARTITION p20160211 VALUES LESS THAN (1455256800) ENGINE = InnoDB,
PARTITION p20160212 VALUES LESS THAN (1455343200) ENGINE = InnoDB,
PARTITION p20160213 VALUES LESS THAN (1455429600) ENGINE = InnoDB,
PARTITION p20160214 VALUES LESS THAN (1455516000) ENGINE = InnoDB,
PARTITION p20160215 VALUES LESS THAN (1455602400) ENGINE = InnoDB,
PARTITION p20160216 VALUES LESS THAN (1455688800) ENGINE = InnoDB,
PARTITION p20160217 VALUES LESS THAN (1455775200) ENGINE = InnoDB,
PARTITION p20160218 VALUES LESS THAN (1455861600) ENGINE = InnoDB,
PARTITION p20160219 VALUES LESS THAN (1455948000) ENGINE = InnoDB,
PARTITION p20160220 VALUES LESS THAN (1456034400) ENGINE = InnoDB,
PARTITION p20160221 VALUES LESS THAN (1456120800) ENGINE = InnoDB,
PARTITION p20160222 VALUES LESS THAN (1456207200) ENGINE = InnoDB,
PARTITION p20160223 VALUES LESS THAN (1456293600) ENGINE = InnoDB,
PARTITION p20160224 VALUES LESS THAN (1456380000) ENGINE = InnoDB,
PARTITION p20160225 VALUES LESS THAN (1456466400) ENGINE = InnoDB,
PARTITION p20160226 VALUES LESS THAN (1456552800) ENGINE = InnoDB,
PARTITION p20160227 VALUES LESS THAN (1456639200) ENGINE = InnoDB,
PARTITION p20160228 VALUES LESS THAN (1456725600) ENGINE = InnoDB,
PARTITION p20160229 VALUES LESS THAN (1456812000) ENGINE = InnoDB,
PARTITION p20160301 VALUES LESS THAN (1456898400) ENGINE = InnoDB,
PARTITION p20160302 VALUES LESS THAN (1456984800) ENGINE = InnoDB,
PARTITION p20160303 VALUES LESS THAN (1457071200) ENGINE = InnoDB,
PARTITION p20160304 VALUES LESS THAN (1457157600) ENGINE = InnoDB,
PARTITION p20160305 VALUES LESS THAN (1457244000) ENGINE = InnoDB,
PARTITION p20160306 VALUES LESS THAN (1457330400) ENGINE = InnoDB,
PARTITION p20160307 VALUES LESS THAN (1457416800) ENGINE = InnoDB,
PARTITION p20160308 VALUES LESS THAN (1457503200) ENGINE = InnoDB,
PARTITION p20160309 VALUES LESS THAN (1457589600) ENGINE = InnoDB,
PARTITION p20160310 VALUES LESS THAN (1457676000) ENGINE = InnoDB,
PARTITION p20160311 VALUES LESS THAN (1457762400) ENGINE = InnoDB,
PARTITION p20160312 VALUES LESS THAN (1457848800) ENGINE = InnoDB,
PARTITION p20160313 VALUES LESS THAN (1457931600) ENGINE = InnoDB,
PARTITION p20160314 VALUES LESS THAN (1458018000) ENGINE = InnoDB,
PARTITION p20160315 VALUES LESS THAN (1458104400) ENGINE = InnoDB,
PARTITION p20160316 VALUES LESS THAN (1458190800) ENGINE = InnoDB,
PARTITION p20160317 VALUES LESS THAN (1458277200) ENGINE = InnoDB,
PARTITION p20160318 VALUES LESS THAN (1458363600) ENGINE = InnoDB,
PARTITION p20160319 VALUES LESS THAN (1458450000) ENGINE = InnoDB,
PARTITION p20160320 VALUES LESS THAN (1458536400) ENGINE = InnoDB,
PARTITION p20160321 VALUES LESS THAN (1458622800) ENGINE = InnoDB,
PARTITION p20160322 VALUES LESS THAN (1458709200) ENGINE = InnoDB,
PARTITION p20160323 VALUES LESS THAN (1458795600) ENGINE = InnoDB,
PARTITION p20160324 VALUES LESS THAN (1458882000) ENGINE = InnoDB,
PARTITION p20160325 VALUES LESS THAN (1458968400) ENGINE = InnoDB,
PARTITION p20160326 VALUES LESS THAN (1459054800) ENGINE = InnoDB,
PARTITION p20160327 VALUES LESS THAN (1459141200) ENGINE = InnoDB,
PARTITION p20160328 VALUES LESS THAN (1459227600) ENGINE = InnoDB,
PARTITION p20160329 VALUES LESS THAN (1459314000) ENGINE = InnoDB,
PARTITION p20160330 VALUES LESS THAN (1459400400) ENGINE = InnoDB,
PARTITION p20160331 VALUES LESS THAN (1459486800) ENGINE = InnoDB,
PARTITION p20160401 VALUES LESS THAN (1459573200) ENGINE = InnoDB,
PARTITION p20160402 VALUES LESS THAN (1459659600) ENGINE = InnoDB,
PARTITION p20160403 VALUES LESS THAN (1459746000) ENGINE = InnoDB,
PARTITION p20160404 VALUES LESS THAN (1459832400) ENGINE = InnoDB,
PARTITION p20160405 VALUES LESS THAN (1459918800) ENGINE = InnoDB,
PARTITION p20160406 VALUES LESS THAN (1460005200) ENGINE = InnoDB,
PARTITION p20160407 VALUES LESS THAN (1460091600) ENGINE = InnoDB,
PARTITION p20160408 VALUES LESS THAN (1460178000) ENGINE = InnoDB,
PARTITION p20160409 VALUES LESS THAN (1460264400) ENGINE = InnoDB,
PARTITION p20160410 VALUES LESS THAN (1460350800) ENGINE = InnoDB,
PARTITION p20160411 VALUES LESS THAN (1460437200) ENGINE = InnoDB,
PARTITION p20160412 VALUES LESS THAN (1460523600) ENGINE = InnoDB,
PARTITION p20160413 VALUES LESS THAN (1460610000) ENGINE = InnoDB,
PARTITION p20160414 VALUES LESS THAN (1460696400) ENGINE = InnoDB,
PARTITION p20160415 VALUES LESS THAN (1460782800) ENGINE = InnoDB,
PARTITION p20160416 VALUES LESS THAN (1460869200) ENGINE = InnoDB,
PARTITION p20160417 VALUES LESS THAN (1460955600) ENGINE = InnoDB,
PARTITION p20160418 VALUES LESS THAN (1461042000) ENGINE = InnoDB,
PARTITION p20160419 VALUES LESS THAN (1461128400) ENGINE = InnoDB,
PARTITION p20160420 VALUES LESS THAN (1461214800) ENGINE = InnoDB,
PARTITION p20160421 VALUES LESS THAN (1461301200) ENGINE = InnoDB,
PARTITION p20160422 VALUES LESS THAN (1461387600) ENGINE = InnoDB,
PARTITION p20160423 VALUES LESS THAN (1461474000) ENGINE = InnoDB,
PARTITION p20160424 VALUES LESS THAN (1461560400) ENGINE = InnoDB,
PARTITION p20160425 VALUES LESS THAN (1461646800) ENGINE = InnoDB,
PARTITION p20160426 VALUES LESS THAN (1461733200) ENGINE = InnoDB,
PARTITION p20160427 VALUES LESS THAN (1461819600) ENGINE = InnoDB,
PARTITION p20160428 VALUES LESS THAN (1461906000) ENGINE = InnoDB,
PARTITION p20160429 VALUES LESS THAN (1461992400) ENGINE = InnoDB,
PARTITION p20160430 VALUES LESS THAN (1462078800) ENGINE = InnoDB,
PARTITION p20160501 VALUES LESS THAN (1462165200) ENGINE = InnoDB,
PARTITION p20160502 VALUES LESS THAN (1462251600) ENGINE = InnoDB,
PARTITION p20160503 VALUES LESS THAN (1462338000) ENGINE = InnoDB,
PARTITION p20160504 VALUES LESS THAN (1462424400) ENGINE = InnoDB,
PARTITION p20160505 VALUES LESS THAN (1462510800) ENGINE = InnoDB,
PARTITION p20160506 VALUES LESS THAN (1462597200) ENGINE = InnoDB,
PARTITION p20160507 VALUES LESS THAN (1462683600) ENGINE = InnoDB,
PARTITION p20160508 VALUES LESS THAN (1462770000) ENGINE = InnoDB,
PARTITION p20160509 VALUES LESS THAN (1462856400) ENGINE = InnoDB,
PARTITION p20160510 VALUES LESS THAN (1462942800) ENGINE = InnoDB,
PARTITION p20160511 VALUES LESS THAN (1463029200) ENGINE = InnoDB,
PARTITION p20160512 VALUES LESS THAN (1463115600) ENGINE = InnoDB,
PARTITION p20160513 VALUES LESS THAN (1463202000) ENGINE = InnoDB,
PARTITION p20160514 VALUES LESS THAN (1463288400) ENGINE = InnoDB,
PARTITION p20160515 VALUES LESS THAN (1463374800) ENGINE = InnoDB,
PARTITION p20160516 VALUES LESS THAN (1463461200) ENGINE = InnoDB,
PARTITION p20160517 VALUES LESS THAN (1463547600) ENGINE = InnoDB,
PARTITION p20160518 VALUES LESS THAN (1463634000) ENGINE = InnoDB,
PARTITION p20160519 VALUES LESS THAN (1463720400) ENGINE = InnoDB,
PARTITION p20160520 VALUES LESS THAN (1463806800) ENGINE = InnoDB,
PARTITION p20160521 VALUES LESS THAN (1463893200) ENGINE = InnoDB,
PARTITION p20160522 VALUES LESS THAN (1463979600) ENGINE = InnoDB,
PARTITION p20160523 VALUES LESS THAN (1464066000) ENGINE = InnoDB,
PARTITION p20160524 VALUES LESS THAN (1464152400) ENGINE = InnoDB,
PARTITION p20160525 VALUES LESS THAN (1464238800) ENGINE = InnoDB,
PARTITION p20160526 VALUES LESS THAN (1464325200) ENGINE = InnoDB,
PARTITION p20160527 VALUES LESS THAN (1464411600) ENGINE = InnoDB,
PARTITION p20160528 VALUES LESS THAN (1464498000) ENGINE = InnoDB,
PARTITION p20160529 VALUES LESS THAN (1464584400) ENGINE = InnoDB,
PARTITION p20160530 VALUES LESS THAN (1464670800) ENGINE = InnoDB,
PARTITION p20160531 VALUES LESS THAN (1464757200) ENGINE = InnoDB,
PARTITION p20160601 VALUES LESS THAN (1464843600) ENGINE = InnoDB,
PARTITION p20160602 VALUES LESS THAN (1464930000) ENGINE = InnoDB,
PARTITION p20160603 VALUES LESS THAN (1465016400) ENGINE = InnoDB,
PARTITION p20160604 VALUES LESS THAN (1465102800) ENGINE = InnoDB,
PARTITION p20160605 VALUES LESS THAN (1465189200) ENGINE = InnoDB,
PARTITION p20160606 VALUES LESS THAN (1465275600) ENGINE = InnoDB,
PARTITION p20160607 VALUES LESS THAN (1465362000) ENGINE = InnoDB,
PARTITION p20160608 VALUES LESS THAN (1465448400) ENGINE = InnoDB,
PARTITION p20160609 VALUES LESS THAN (1465534800) ENGINE = InnoDB,
PARTITION p20160610 VALUES LESS THAN (1465621200) ENGINE = InnoDB,
PARTITION p20160611 VALUES LESS THAN (1465707600) ENGINE = InnoDB,
PARTITION p20160612 VALUES LESS THAN (1465794000) ENGINE = InnoDB,
PARTITION p20160613 VALUES LESS THAN (1465880400) ENGINE = InnoDB,
PARTITION p20160614 VALUES LESS THAN (1465966800) ENGINE = InnoDB,
PARTITION p20160615 VALUES LESS THAN (1466053200) ENGINE = InnoDB,
PARTITION p20160616 VALUES LESS THAN (1466139600) ENGINE = InnoDB,
PARTITION p20160617 VALUES LESS THAN (1466226000) ENGINE = InnoDB,
PARTITION p20160618 VALUES LESS THAN (1466312400) ENGINE = InnoDB,
PARTITION p20160619 VALUES LESS THAN (1466398800) ENGINE = InnoDB,
PARTITION p20160620 VALUES LESS THAN (1466485200) ENGINE = InnoDB,
PARTITION p20160621 VALUES LESS THAN (1466571600) ENGINE = InnoDB,
PARTITION p20160622 VALUES LESS THAN (1466658000) ENGINE = InnoDB,
PARTITION p20160623 VALUES LESS THAN (1466744400) ENGINE = InnoDB,
PARTITION p20160624 VALUES LESS THAN (1466830800) ENGINE = InnoDB,
PARTITION p20160625 VALUES LESS THAN (1466917200) ENGINE = InnoDB,
PARTITION p20160626 VALUES LESS THAN (1467003600) ENGINE = InnoDB,
PARTITION p20160627 VALUES LESS THAN (1467090000) ENGINE = InnoDB,
PARTITION p20160628 VALUES LESS THAN (1467176400) ENGINE = InnoDB,
PARTITION p20160629 VALUES LESS THAN (1467262800) ENGINE = InnoDB,
PARTITION p20160630 VALUES LESS THAN (1467349200) ENGINE = InnoDB,
PARTITION p20160701 VALUES LESS THAN (1467435600) ENGINE = InnoDB,
PARTITION p20160702 VALUES LESS THAN (1467522000) ENGINE = InnoDB,
PARTITION p20160703 VALUES LESS THAN (1467608400) ENGINE = InnoDB,
PARTITION p20160704 VALUES LESS THAN (1467694800) ENGINE = InnoDB,
PARTITION p20160705 VALUES LESS THAN (1467781200) ENGINE = InnoDB,
PARTITION p20160706 VALUES LESS THAN (1467867600) ENGINE = InnoDB,
PARTITION p20160707 VALUES LESS THAN (1467954000) ENGINE = InnoDB,
PARTITION p20160708 VALUES LESS THAN (1468040400) ENGINE = InnoDB,
PARTITION p20160709 VALUES LESS THAN (1468126800) ENGINE = InnoDB,
PARTITION p20160710 VALUES LESS THAN (1468213200) ENGINE = InnoDB,
PARTITION p20160711 VALUES LESS THAN (1468299600) ENGINE = InnoDB,
PARTITION p20160712 VALUES LESS THAN (1468386000) ENGINE = InnoDB,
PARTITION p20160713 VALUES LESS THAN (1468472400) ENGINE = InnoDB,
PARTITION p20160714 VALUES LESS THAN (1468558800) ENGINE = InnoDB,
PARTITION p20160715 VALUES LESS THAN (1468645200) ENGINE = InnoDB,
PARTITION p20160716 VALUES LESS THAN (1468731600) ENGINE = InnoDB,
PARTITION p20160717 VALUES LESS THAN (1468818000) ENGINE = InnoDB,
PARTITION p20160718 VALUES LESS THAN (1468904400) ENGINE = InnoDB,
PARTITION p20160719 VALUES LESS THAN (1468990800) ENGINE = InnoDB,
PARTITION p20160720 VALUES LESS THAN (1469077200) ENGINE = InnoDB,
PARTITION p20160721 VALUES LESS THAN (1469163600) ENGINE = InnoDB,
PARTITION p20160722 VALUES LESS THAN (1469250000) ENGINE = InnoDB,
PARTITION p20160723 VALUES LESS THAN (1469336400) ENGINE = InnoDB,
PARTITION p20160724 VALUES LESS THAN (1469422800) ENGINE = InnoDB,
PARTITION p20160725 VALUES LESS THAN (1469509200) ENGINE = InnoDB,
PARTITION p20160726 VALUES LESS THAN (1469595600) ENGINE = InnoDB,
PARTITION p20160727 VALUES LESS THAN (1469682000) ENGINE = InnoDB,
PARTITION p20160728 VALUES LESS THAN (1469768400) ENGINE = InnoDB,
PARTITION p20160729 VALUES LESS THAN (1469854800) ENGINE = InnoDB,
PARTITION p20160730 VALUES LESS THAN (1469941200) ENGINE = InnoDB,
PARTITION p20160731 VALUES LESS THAN (1470027600) ENGINE = InnoDB,
PARTITION p20160801 VALUES LESS THAN (1470114000) ENGINE = InnoDB,
PARTITION p20160802 VALUES LESS THAN (1470200400) ENGINE = InnoDB,
PARTITION p20160803 VALUES LESS THAN (1470286800) ENGINE = InnoDB,
PARTITION p20160804 VALUES LESS THAN (1470373200) ENGINE = InnoDB,
PARTITION p20160805 VALUES LESS THAN (1470459600) ENGINE = InnoDB,
PARTITION p20160806 VALUES LESS THAN (1470546000) ENGINE = InnoDB,
PARTITION p20160807 VALUES LESS THAN (1470632400) ENGINE = InnoDB,
PARTITION p20160808 VALUES LESS THAN (1470718800) ENGINE = InnoDB,
PARTITION p20160809 VALUES LESS THAN (1470805200) ENGINE = InnoDB,
PARTITION p20160810 VALUES LESS THAN (1470891600) ENGINE = InnoDB,
PARTITION p20160811 VALUES LESS THAN (1470978000) ENGINE = InnoDB,
PARTITION p20160812 VALUES LESS THAN (1471064400) ENGINE = InnoDB,
PARTITION p20160813 VALUES LESS THAN (1471150800) ENGINE = InnoDB,
PARTITION p20160814 VALUES LESS THAN (1471237200) ENGINE = InnoDB,
PARTITION p20160815 VALUES LESS THAN (1471323600) ENGINE = InnoDB,
PARTITION p20160816 VALUES LESS THAN (1471410000) ENGINE = InnoDB,
PARTITION p20160817 VALUES LESS THAN (1471496400) ENGINE = InnoDB,
PARTITION p20160818 VALUES LESS THAN (1471582800) ENGINE = InnoDB,
PARTITION p20160819 VALUES LESS THAN (1471669200) ENGINE = InnoDB,
PARTITION p20160820 VALUES LESS THAN (1471755600) ENGINE = InnoDB,
PARTITION p20160821 VALUES LESS THAN (1471842000) ENGINE = InnoDB,
PARTITION p20160822 VALUES LESS THAN (1471928400) ENGINE = InnoDB,
PARTITION p20160823 VALUES LESS THAN (1472014800) ENGINE = InnoDB,
PARTITION p20160824 VALUES LESS THAN (1472101200) ENGINE = InnoDB,
PARTITION p20160825 VALUES LESS THAN (1472187600) ENGINE = InnoDB,
PARTITION p20160826 VALUES LESS THAN (1472274000) ENGINE = InnoDB,
PARTITION p20160827 VALUES LESS THAN (1472360400) ENGINE = InnoDB,
PARTITION p20160828 VALUES LESS THAN (1472446800) ENGINE = InnoDB,
PARTITION p20160829 VALUES LESS THAN (1472533200) ENGINE = InnoDB,
PARTITION p20160830 VALUES LESS THAN (1472619600) ENGINE = InnoDB,
PARTITION p20160831 VALUES LESS THAN (1472706000) ENGINE = InnoDB,
PARTITION p20160901 VALUES LESS THAN (1472792400) ENGINE = InnoDB,
PARTITION p20160902 VALUES LESS THAN (1472878800) ENGINE = InnoDB,
PARTITION p20160903 VALUES LESS THAN (1472965200) ENGINE = InnoDB,
PARTITION p20160904 VALUES LESS THAN (1473051600) ENGINE = InnoDB,
PARTITION p20160905 VALUES LESS THAN (1473138000) ENGINE = InnoDB,
PARTITION p20160906 VALUES LESS THAN (1473224400) ENGINE = InnoDB,
PARTITION p20160907 VALUES LESS THAN (1473310800) ENGINE = InnoDB,
PARTITION p20160908 VALUES LESS THAN (1473397200) ENGINE = InnoDB,
PARTITION p20160909 VALUES LESS THAN (1473483600) ENGINE = InnoDB,
PARTITION p20160910 VALUES LESS THAN (1473570000) ENGINE = InnoDB,
PARTITION p20160911 VALUES LESS THAN (1473656400) ENGINE = InnoDB,
PARTITION p20160912 VALUES LESS THAN (1473742800) ENGINE = InnoDB,
PARTITION p20160913 VALUES LESS THAN (1473829200) ENGINE = InnoDB,
PARTITION p20160914 VALUES LESS THAN (1473915600) ENGINE = InnoDB,
PARTITION p20160915 VALUES LESS THAN (1474002000) ENGINE = InnoDB,
PARTITION p20160916 VALUES LESS THAN (1474088400) ENGINE = InnoDB,
PARTITION p20160917 VALUES LESS THAN (1474174800) ENGINE = InnoDB,
PARTITION p20160918 VALUES LESS THAN (1474261200) ENGINE = InnoDB,
PARTITION p20160919 VALUES LESS THAN (1474347600) ENGINE = InnoDB,
PARTITION p20160920 VALUES LESS THAN (1474434000) ENGINE = InnoDB,
PARTITION p20160921 VALUES LESS THAN (1474520400) ENGINE = InnoDB,
PARTITION p20160922 VALUES LESS THAN (1474606800) ENGINE = InnoDB,
PARTITION p20160923 VALUES LESS THAN (1474693200) ENGINE = InnoDB,
PARTITION p20160924 VALUES LESS THAN (1474779600) ENGINE = InnoDB,
PARTITION p20160925 VALUES LESS THAN (1474866000) ENGINE = InnoDB,
PARTITION p20160926 VALUES LESS THAN (1474952400) ENGINE = InnoDB,
PARTITION p20160927 VALUES LESS THAN (1475038800) ENGINE = InnoDB,
PARTITION p20160928 VALUES LESS THAN (1475125200) ENGINE = InnoDB,
PARTITION p20160929 VALUES LESS THAN (1475211600) ENGINE = InnoDB,
PARTITION p20160930 VALUES LESS THAN (1475298000) ENGINE = InnoDB,
PARTITION p20161001 VALUES LESS THAN (1475384400) ENGINE = InnoDB,
PARTITION p20161002 VALUES LESS THAN (1475470800) ENGINE = InnoDB,
PARTITION p20161003 VALUES LESS THAN (1475557200) ENGINE = InnoDB,
PARTITION p20161004 VALUES LESS THAN (1475643600) ENGINE = InnoDB,
PARTITION p20161005 VALUES LESS THAN (1475730000) ENGINE = InnoDB,
PARTITION p20161006 VALUES LESS THAN (1475816400) ENGINE = InnoDB,
PARTITION p20161007 VALUES LESS THAN (1475902800) ENGINE = InnoDB,
PARTITION p20161008 VALUES LESS THAN (1475989200) ENGINE = InnoDB,
PARTITION p20161009 VALUES LESS THAN (1476075600) ENGINE = InnoDB,
PARTITION p20161010 VALUES LESS THAN (1476162000) ENGINE = InnoDB,
PARTITION p20161011 VALUES LESS THAN (1476248400) ENGINE = InnoDB,
PARTITION p20161012 VALUES LESS THAN (1476334800) ENGINE = InnoDB,
PARTITION p20161013 VALUES LESS THAN (1476421200) ENGINE = InnoDB,
PARTITION p20161014 VALUES LESS THAN (1476507600) ENGINE = InnoDB,
PARTITION p20161015 VALUES LESS THAN (1476594000) ENGINE = InnoDB,
PARTITION p20161016 VALUES LESS THAN (1476680400) ENGINE = InnoDB,
PARTITION p20161017 VALUES LESS THAN (1476766800) ENGINE = InnoDB,
PARTITION p20161018 VALUES LESS THAN (1476853200) ENGINE = InnoDB,
PARTITION p20161019 VALUES LESS THAN (1476939600) ENGINE = InnoDB,
PARTITION p20161020 VALUES LESS THAN (1477026000) ENGINE = InnoDB,
PARTITION p20161021 VALUES LESS THAN (1477112400) ENGINE = InnoDB,
PARTITION p20161022 VALUES LESS THAN (1477198800) ENGINE = InnoDB,
PARTITION p20161023 VALUES LESS THAN (1477285200) ENGINE = InnoDB,
PARTITION p20161024 VALUES LESS THAN (1477371600) ENGINE = InnoDB,
PARTITION p20161025 VALUES LESS THAN (1477458000) ENGINE = InnoDB,
PARTITION p20161026 VALUES LESS THAN (1477544400) ENGINE = InnoDB,
PARTITION p20161027 VALUES LESS THAN (1477630800) ENGINE = InnoDB,
PARTITION p20161028 VALUES LESS THAN (1477717200) ENGINE = InnoDB,
PARTITION p20161029 VALUES LESS THAN (1477803600) ENGINE = InnoDB,
PARTITION p20161030 VALUES LESS THAN (1477890000) ENGINE = InnoDB,
PARTITION p20161031 VALUES LESS THAN (1477976400) ENGINE = InnoDB,
PARTITION p20161101 VALUES LESS THAN (1478062800) ENGINE = InnoDB,
PARTITION p20161102 VALUES LESS THAN (1478149200) ENGINE = InnoDB,
PARTITION p20161103 VALUES LESS THAN (1478235600) ENGINE = InnoDB,
PARTITION p20161104 VALUES LESS THAN (1478322000) ENGINE = InnoDB,
PARTITION p20161105 VALUES LESS THAN (1478408400) ENGINE = InnoDB,
PARTITION p20161106 VALUES LESS THAN (1478494800) ENGINE = InnoDB,
PARTITION p20161107 VALUES LESS THAN (1478667600) ENGINE = InnoDB,
PARTITION p20161108 VALUES LESS THAN (1478754000) ENGINE = InnoDB,
PARTITION p20161109 VALUES LESS THAN (1478840400) ENGINE = InnoDB,
PARTITION p20161110 VALUES LESS THAN (1478926800) ENGINE = InnoDB,
PARTITION p20161111 VALUES LESS THAN (1479013200) ENGINE = InnoDB,
PARTITION p20161112 VALUES LESS THAN (1479099600) ENGINE = InnoDB,
PARTITION p20161113 VALUES LESS THAN (1479186000) ENGINE = InnoDB,
PARTITION p20161114 VALUES LESS THAN (1479272400) ENGINE = InnoDB,
PARTITION p20161115 VALUES LESS THAN (1479276000) ENGINE = InnoDB,
PARTITION p20161116 VALUES LESS THAN (1479362400) ENGINE = InnoDB,
PARTITION p20161117 VALUES LESS THAN (1479448800) ENGINE = InnoDB,
PARTITION p20161118 VALUES LESS THAN (1479535200) ENGINE = InnoDB,
PARTITION p20161119 VALUES LESS THAN (1479621600) ENGINE = InnoDB,
PARTITION p20161120 VALUES LESS THAN (1479708000) ENGINE = InnoDB,
PARTITION p20161121 VALUES LESS THAN (1479794400) ENGINE = InnoDB,
PARTITION p20161122 VALUES LESS THAN (1479880800) ENGINE = InnoDB,
PARTITION p20161123 VALUES LESS THAN (1479967200) ENGINE = InnoDB,
PARTITION p20161124 VALUES LESS THAN (1480053600) ENGINE = InnoDB,
PARTITION p20161125 VALUES LESS THAN (1480140000) ENGINE = InnoDB,
PARTITION p20161126 VALUES LESS THAN (1480226400) ENGINE = InnoDB,
PARTITION p20161127 VALUES LESS THAN (1480312800) ENGINE = InnoDB,
PARTITION p20161128 VALUES LESS THAN (1480399200) ENGINE = InnoDB,
PARTITION p20161129 VALUES LESS THAN (1480485600) ENGINE = InnoDB) */
*************************** 1. row ***************************
trigger_depends
CREATE TABLE `trigger_depends` (
`triggerdepid` bigint(20) unsigned NOT NULL,
`triggerid_down` bigint(20) unsigned NOT NULL,
`triggerid_up` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`triggerdepid`),
UNIQUE KEY `trigger_depends_1` (`triggerid_down`,`triggerid_up`),
KEY `trigger_depends_2` (`triggerid_up`),
CONSTRAINT `c_trigger_depends_1` FOREIGN KEY (`triggerid_down`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE,
CONSTRAINT `c_trigger_depends_2` FOREIGN KEY (`triggerid_up`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
trigger_discovery
CREATE TABLE `trigger_discovery` (
`triggerdiscoveryid` bigint(20) unsigned NOT NULL,
`triggerid` bigint(20) unsigned NOT NULL,
`parent_triggerid` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`triggerdiscoveryid`),
UNIQUE KEY `trigger_discovery_1` (`triggerid`,`parent_triggerid`),
KEY `c_trigger_discovery_2` (`parent_triggerid`),
KEY `trigger_discovery_2` (`parent_triggerid`),
CONSTRAINT `c_trigger_discovery_1` FOREIGN KEY (`triggerid`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE,
CONSTRAINT `c_trigger_discovery_2` FOREIGN KEY (`parent_triggerid`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
triggers
CREATE TABLE `triggers` (
`triggerid` bigint(20) unsigned NOT NULL,
`expression` varchar(2048) NOT NULL DEFAULT '',
`description` varchar(255) NOT NULL DEFAULT '',
`url` varchar(255) NOT NULL DEFAULT '',
`status` int(11) NOT NULL DEFAULT '0',
`value` int(11) NOT NULL DEFAULT '0',
`priority` int(11) NOT NULL DEFAULT '0',
`lastchange` int(11) NOT NULL DEFAULT '0',
`comments` text NOT NULL,
`error` varchar(128) NOT NULL DEFAULT '',
`templateid` bigint(20) unsigned DEFAULT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`state` int(11) NOT NULL DEFAULT '0',
`flags` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`triggerid`),
KEY `triggers_1` (`status`),
KEY `c_triggers_1` (`templateid`),
KEY `triggers_3` (`templateid`),
KEY `triggers_2` (`value`,`lastchange`),
CONSTRAINT `c_triggers_1` FOREIGN KEY (`templateid`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
user_history
CREATE TABLE `user_history` (
`userhistoryid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
`title1` varchar(255) NOT NULL DEFAULT '',
`url1` varchar(255) NOT NULL DEFAULT '',
`title2` varchar(255) NOT NULL DEFAULT '',
`url2` varchar(255) NOT NULL DEFAULT '',
`title3` varchar(255) NOT NULL DEFAULT '',
`url3` varchar(255) NOT NULL DEFAULT '',
`title4` varchar(255) NOT NULL DEFAULT '',
`url4` varchar(255) NOT NULL DEFAULT '',
`title5` varchar(255) NOT NULL DEFAULT '',
`url5` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`userhistoryid`),
UNIQUE KEY `user_history_1` (`userid`),
CONSTRAINT `c_user_history_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
users
CREATE TABLE `users` (
`userid` bigint(20) unsigned NOT NULL,
`alias` varchar(100) NOT NULL DEFAULT '',
`name` varchar(100) NOT NULL DEFAULT '',
`surname` varchar(100) NOT NULL DEFAULT '',
`passwd` char(32) NOT NULL DEFAULT '',
`url` varchar(255) NOT NULL DEFAULT '',
`autologin` int(11) NOT NULL DEFAULT '0',
`autologout` int(11) NOT NULL DEFAULT '900',
`lang` varchar(5) NOT NULL DEFAULT 'en_GB',
`refresh` int(11) NOT NULL DEFAULT '30',
`type` int(11) NOT NULL DEFAULT '1',
`theme` varchar(128) NOT NULL DEFAULT 'default',
`attempt_failed` int(11) NOT NULL DEFAULT '0',
`attempt_ip` varchar(39) NOT NULL DEFAULT '',
`attempt_clock` int(11) NOT NULL DEFAULT '0',
`rows_per_page` int(11) NOT NULL DEFAULT '50',
PRIMARY KEY (`userid`),
KEY `users_1` (`alias`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
users_groups
CREATE TABLE `users_groups` (
`id` bigint(20) unsigned NOT NULL,
`usrgrpid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_groups_1` (`usrgrpid`,`userid`),
KEY `c_users_groups_2` (`userid`),
KEY `users_groups_2` (`userid`),
CONSTRAINT `c_users_groups_1` FOREIGN KEY (`usrgrpid`) REFERENCES `usrgrp` (`usrgrpid`) ON DELETE CASCADE,
CONSTRAINT `c_users_groups_2` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
usrgrp
CREATE TABLE `usrgrp` (
`usrgrpid` bigint(20) unsigned NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`gui_access` int(11) NOT NULL DEFAULT '0',
`users_status` int(11) NOT NULL DEFAULT '0',
`debug_mode` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`usrgrpid`),
KEY `usrgrp_1` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*************************** 1. row ***************************
valuemaps
CREATE TABLE `valuemaps` (
`valuemapid` bigint(20) unsigned NOT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY (`valuemapid`),
KEY `valuemaps_1` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment