· 9 years ago · Jan 13, 2017, 09:56 AM
1DROP TABLE IF EXISTS `metric_values`;
2/*!40101 SET @saved_cs_client = @@character_set_client */;
3/*!40101 SET character_set_client = utf8 */;
4CREATE TABLE `metric_values` (
5 `id` int(11) NOT NULL AUTO_INCREMENT,
6 `metric` float DEFAULT NULL,
7 `switches_id` int(11) NOT NULL,
8 `interfaces_id` int(11) NOT NULL,
9 `date` bigint(20) NOT NULL,
10 PRIMARY KEY (`id`),
11 UNIQUE KEY `date_2` (`date`,`interfaces_id`),
12 KEY `switches_id` (`switches_id`),
13 KEY `interfaces_id` (`interfaces_id`),
14 KEY `date` (`date`),
15 KEY `metric` (`metric`),
16 CONSTRAINT `metric_values_ibfk_1` FOREIGN KEY (`switches_id`) REFERENCES `switches` (`id`),
17 CONSTRAINT `metric_values_ibfk_2` FOREIGN KEY (`interfaces_id`) REFERENCES `interfaces` (`id`)
18) ENGINE=InnoDB AUTO_INCREMENT=549222 DEFAULT CHARSET=latin1;
19/*!40101 SET character_set_client = @saved_cs_client */;