· 8 years ago · Mar 25, 2018, 04:18 PM
1-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
2--
3-- Host: localhost Database: wildreservation
4-- ------------------------------------------------------
5-- Server version 5.7.21-0ubuntu0.16.04.1
6
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 */;
17
18--
19-- Table structure for table `reservation`
20--
21
22DROP TABLE IF EXISTS `reservation`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `reservation` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `person_id` int(11) NOT NULL,
28 `room_id` int(11) NOT NULL,
29 `begin` datetime NOT NULL,
30 `duration` int(11) NOT NULL,
31 PRIMARY KEY (`id`),
32 KEY `fk_reservation_1_idx` (`person_id`),
33 KEY `fk_room_idx` (`room_id`),
34 CONSTRAINT `fk_reservation_1` FOREIGN KEY (`person_id`) REFERENCES `wildness` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
35 CONSTRAINT `fk_room` FOREIGN KEY (`room_id`) REFERENCES `room` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
36) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
37/*!40101 SET character_set_client = @saved_cs_client */;
38
39--
40-- Dumping data for table `reservation`
41--
42
43LOCK TABLES `reservation` WRITE;
44/*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
45INSERT INTO `reservation` VALUES (1,10,1,'2018-04-01 00:00:00',1),(2,9,1,'2018-04-02 00:00:00',2),(3,8,1,'2018-04-03 00:00:00',1),(4,7,5,'2018-04-04 00:00:00',2),(5,5,5,'2018-04-05 00:00:00',4),(6,6,3,'2018-04-06 00:00:00',1),(7,4,6,'2018-04-07 00:00:00',2),(8,3,6,'2018-04-08 00:00:00',1),(9,2,6,'2018-04-09 00:00:00',3),(10,1,6,'2018-04-22 00:00:00',1);
46/*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
47UNLOCK TABLES;
48
49--
50-- Table structure for table `role`
51--
52
53DROP TABLE IF EXISTS `role`;
54/*!40101 SET @saved_cs_client = @@character_set_client */;
55/*!40101 SET character_set_client = utf8 */;
56CREATE TABLE `role` (
57 `id` int(11) NOT NULL AUTO_INCREMENT,
58 `name` varchar(45) NOT NULL,
59 PRIMARY KEY (`id`)
60) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
61/*!40101 SET character_set_client = @saved_cs_client */;
62
63--
64-- Dumping data for table `role`
65--
66
67LOCK TABLES `role` WRITE;
68/*!40000 ALTER TABLE `role` DISABLE KEYS */;
69INSERT INTO `role` VALUES (1,'teacher'),(2,'student');
70/*!40000 ALTER TABLE `role` ENABLE KEYS */;
71UNLOCK TABLES;
72
73--
74-- Table structure for table `room`
75--
76
77DROP TABLE IF EXISTS `room`;
78/*!40101 SET @saved_cs_client = @@character_set_client */;
79/*!40101 SET character_set_client = utf8 */;
80CREATE TABLE `room` (
81 `id` int(11) NOT NULL AUTO_INCREMENT,
82 `name` varchar(45) NOT NULL,
83 PRIMARY KEY (`id`)
84) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
85/*!40101 SET character_set_client = @saved_cs_client */;
86
87--
88-- Dumping data for table `room`
89--
90
91LOCK TABLES `room` WRITE;
92/*!40000 ALTER TABLE `room` DISABLE KEYS */;
93INSERT INTO `room` VALUES (1,'dojo_room'),(2,'reunion_room'),(3,'chill_room'),(4,'kitchen'),(5,'office'),(6,'openspace');
94/*!40000 ALTER TABLE `room` ENABLE KEYS */;
95UNLOCK TABLES;
96
97--
98-- Table structure for table `wildness`
99--
100
101DROP TABLE IF EXISTS `wildness`;
102/*!40101 SET @saved_cs_client = @@character_set_client */;
103/*!40101 SET character_set_client = utf8 */;
104CREATE TABLE `wildness` (
105 `id` int(11) NOT NULL AUTO_INCREMENT,
106 `firstname` varchar(45) NOT NULL,
107 `lastname` varchar(45) NOT NULL,
108 `address` varchar(400) DEFAULT NULL,
109 `role_id` int(11) NOT NULL,
110 `language` varchar(45) DEFAULT NULL,
111 PRIMARY KEY (`id`,`role_id`),
112 KEY `fk_wildness_role_idx` (`role_id`),
113 CONSTRAINT `fk_wildness_role` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
114) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
115/*!40101 SET character_set_client = @saved_cs_client */;
116
117--
118-- Dumping data for table `wildness`
119--
120
121LOCK TABLES `wildness` WRITE;
122/*!40000 ALTER TABLE `wildness` DISABLE KEYS */;
123INSERT INTO `wildness` VALUES (1,'elodie','laurie','13 avenue champs elysee paris',1,'php'),(2,'frank','google','25 mordor street washington',1,'javascript'),(3,'julien','venot','13 rue republique torreilles',2,NULL),(4,'camille','dippe','22 rue de coulmiers orleans',2,NULL),(5,'sophie','caillet','51 rue du colombier orleans',2,NULL),(6,'fanny','rigot','11 route de solterre pressigny les pins',2,NULL),(7,'mathieu','froment',NULL,2,NULL),(8,'kevin','ribou','11 avenue du general de gaulle montargis',2,NULL),(9,'edouard','argent','58 rue gustave noury chalette sur loing',2,NULL),(10,'elan','musk','444 rue des pres foinville',2,NULL);
124/*!40000 ALTER TABLE `wildness` ENABLE KEYS */;
125UNLOCK TABLES;
126/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
127
128/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
129/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
130/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
131/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
132/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
133/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
134/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
135
136-- Dump completed on 2018-03-16 21:55:53