1 -- MySQL dump 10.13 Distrib 5.5.38, for debian-linux-gnu (x86_64)
3 -- Host: localhost Database: meteo
4 -- ------------------------------------------------------
5 -- Server version 5.5.38-0ubuntu0.14.04.1
7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10 /*!40101 SET NAMES utf8 */;
11 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12 /*!40103 SET TIME_ZONE='+00:00' */;
13 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
19 -- Table structure for table `sensor_values`
22 DROP TABLE IF EXISTS `sensor_values`;
23 /*!40101 SET @saved_cs_client = @@character_set_client */;
24 /*!40101 SET character_set_client = utf8 */;
25 CREATE TABLE `sensor_values` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `sensor_id` int(11) NOT NULL,
28 `timestamp` datetime NOT NULL,
29 `value` float NOT NULL,
30 `parameter_id` int(11) NOT NULL,
32 KEY `fk_sensor_values_sens_idx` (`sensor_id`),
33 KEY `sensor_values_idx` (`sensor_id`,`timestamp`),
34 KEY `fk_sensor_values_param_idx` (`parameter_id`),
35 CONSTRAINT `fk_sensor_values_param` FOREIGN KEY (`parameter_id`) REFERENCES `st_parameters` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
36 CONSTRAINT `fk_sensor_values_sens` FOREIGN KEY (`sensor_id`) REFERENCES `sensors` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
37 ) ENGINE=InnoDB AUTO_INCREMENT=1163082 DEFAULT CHARSET=utf8;
38 /*!40101 SET character_set_client = @saved_cs_client */;
39 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
41 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
42 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
43 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
44 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
45 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
46 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
47 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
49 -- Dump completed on 2014-09-25 14:47:29