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 `sensors`
24 DROP TABLE IF EXISTS `sensors`;
25 /*!40101 SET @saved_cs_client = @@character_set_client */;
26 /*!40101 SET character_set_client = utf8 */;
27 CREATE TABLE `sensors` (
28 `id` int(11) NOT NULL AUTO_INCREMENT,
29 `st_id` int(11) NOT NULL,
30 `s_id` varchar(32) CHARACTER SET utf8 NOT NULL,
31 `s_description` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
33 UNIQUE KEY `UNIQUE` (`st_id`,`s_id`),
34 KEY `fk_sensors_st_idx` (`st_id`),
35 CONSTRAINT `fk_sensors_st` FOREIGN KEY (`st_id`) REFERENCES `sensor_types` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
36 ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
37 /*!40101 SET character_set_client = @saved_cs_client */;
40 -- Dumping data for table `sensors`
43 LOCK TABLES `sensors` WRITE;
44 /*!40000 ALTER TABLE `sensors` DISABLE KEYS */;
45 INSERT INTO `sensors` VALUES (1,1,'DEFAULT','Комната'),(2,2,'44F','Улица'),(3,3,'DEFAULT','Комната');
46 /*!40000 ALTER TABLE `sensors` ENABLE KEYS */;
48 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
50 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
51 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
52 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
53 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
54 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
55 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
56 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
58 -- Dump completed on 2014-03-17 20:31:46