1 CREATE DATABASE IF NOT EXISTS `meteo` /*!40100 DEFAULT CHARACTER SET utf8 */;
3 -- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (i686)
5 -- Host: estia Database: meteo
6 -- ------------------------------------------------------
7 -- Server version 5.5.35-0ubuntu0.13.10.2
9 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12 /*!40101 SET NAMES utf8 */;
13 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
14 /*!40103 SET TIME_ZONE='+00:00' */;
15 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
16 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
17 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
18 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
21 -- Table structure for table `sensor_values`
24 DROP TABLE IF EXISTS `sensor_values`;
25 /*!40101 SET @saved_cs_client = @@character_set_client */;
26 /*!40101 SET character_set_client = utf8 */;
27 CREATE TABLE `sensor_values` (
28 `id` int(11) NOT NULL AUTO_INCREMENT,
29 `sensor_id` int(11) NOT NULL,
30 `timestamp` datetime NOT NULL,
31 `value` float NOT NULL,
32 `parameter_id` int(11) NOT NULL,
34 KEY `fk_sensor_values_sens_idx` (`sensor_id`),
35 KEY `sensor_values_idx` (`sensor_id`,`timestamp`),
36 KEY `fk_sensor_values_param_idx` (`parameter_id`),
37 CONSTRAINT `fk_sensor_values_param` FOREIGN KEY (`parameter_id`) REFERENCES `st_parameters` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
38 CONSTRAINT `fk_sensor_values_sens` FOREIGN KEY (`sensor_id`) REFERENCES `sensors` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
39 ) ENGINE=InnoDB AUTO_INCREMENT=223906 DEFAULT CHARSET=utf8;
40 /*!40101 SET character_set_client = @saved_cs_client */;
43 -- Dumping data for table `sensor_values`
46 LOCK TABLES `sensor_values` WRITE;
47 /*!40000 ALTER TABLE `sensor_values` DISABLE KEYS */;
48 /*!40000 ALTER TABLE `sensor_values` ENABLE KEYS */;
50 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
52 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
53 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
54 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
55 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
56 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
57 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
58 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
60 -- Dump completed on 2014-03-17 20:31:41