Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64)
- --
- -- Host: localhost Database: db_name
- -- ------------------------------------------------------
- -- Server version 5.6.35
- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
- /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
- /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
- /*!40101 SET NAMES utf8 */;
- /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
- /*!40103 SET TIME_ZONE='+00:00' */;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
- --
- -- Current Database: `db_name`
- --
- CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db_name` /*!40100 DEFAULT CHARACTER SET utf8 */;
- USE `db_name`;
- --
- -- Table structure for table `langage`
- --
- DROP TABLE IF EXISTS `langage`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `langage` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `nom` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `langage`
- --
- LOCK TABLES `langage` WRITE;
- /*!40000 ALTER TABLE `langage` DISABLE KEYS */;
- INSERT INTO `langage` VALUES (1,'php'),(2,'javascript'),(3,'python'),(4,'ruby');
- /*!40000 ALTER TABLE `langage` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `personne`
- --
- DROP TABLE IF EXISTS `personne`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `personne` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `nom` varchar(100) DEFAULT NULL,
- `prenom` varchar(100) DEFAULT NULL,
- `role_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `role_id` (`role_id`),
- CONSTRAINT `personne_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `personne`
- --
- LOCK TABLES `personne` WRITE;
- /*!40000 ALTER TABLE `personne` DISABLE KEYS */;
- INSERT INTO `personne` VALUES (1,'google','teach',2),(2,'Beach','Laurie',2),(3,'Lima','Sara',2),(4,'Montout','Diana',2),(5,'Mouse','Mickey',2),(6,'Trump','Donald',2),(7,'Lepen','Jean Marie',2),(8,'Macron','Emmanuel',2),(9,'Kent','Clark',2),(10,'Willis','Bruce',2),(11,'Grandjean','Florian',1),(12,'www','Internet',1);
- /*!40000 ALTER TABLE `personne` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `personne_langage`
- --
- DROP TABLE IF EXISTS `personne_langage`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `personne_langage` (
- `personne_id` int(11) DEFAULT NULL,
- `langage_id` int(11) DEFAULT NULL,
- KEY `personne_id` (`personne_id`),
- KEY `langage_id` (`langage_id`),
- CONSTRAINT `personne_langage_ibfk_1` FOREIGN KEY (`personne_id`) REFERENCES `personne` (`id`),
- CONSTRAINT `personne_langage_ibfk_2` FOREIGN KEY (`langage_id`) REFERENCES `langage` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `personne_langage`
- --
- LOCK TABLES `personne_langage` WRITE;
- /*!40000 ALTER TABLE `personne_langage` DISABLE KEYS */;
- /*!40000 ALTER TABLE `personne_langage` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `reservation`
- --
- DROP TABLE IF EXISTS `reservation`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `reservation` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `date` datetime DEFAULT NULL,
- `salle_id` int(11) DEFAULT NULL,
- `personne_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `salle_id` (`salle_id`),
- KEY `personne_id` (`personne_id`),
- CONSTRAINT `reservation_ibfk_1` FOREIGN KEY (`salle_id`) REFERENCES `salle` (`id`),
- CONSTRAINT `reservation_ibfk_2` FOREIGN KEY (`personne_id`) REFERENCES `personne` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `reservation`
- --
- LOCK TABLES `reservation` WRITE;
- /*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
- INSERT INTO `reservation` VALUES (1,'2017-03-03 15:00:00',1,1),(2,'2017-04-03 16:00:00',1,2),(4,'2017-02-03 14:00:00',1,3),(5,'2017-01-03 14:00:00',5,4),(6,'2017-01-05 17:00:00',5,5),(7,'2017-01-09 09:00:00',3,6),(8,'2017-05-09 11:00:00',6,7),(9,'2017-05-09 12:00:00',6,8),(10,'2017-05-12 16:00:00',6,9),(11,'2017-05-12 09:00:00',6,10);
- /*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `role`
- --
- DROP TABLE IF EXISTS `role`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `role` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `nom` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `role`
- --
- LOCK TABLES `role` WRITE;
- /*!40000 ALTER TABLE `role` DISABLE KEYS */;
- INSERT INTO `role` VALUES (1,'enseignant'),(2,'élève');
- /*!40000 ALTER TABLE `role` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `salle`
- --
- DROP TABLE IF EXISTS `salle`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `salle` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `nom` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `salle`
- --
- LOCK TABLES `salle` WRITE;
- /*!40000 ALTER TABLE `salle` DISABLE KEYS */;
- INSERT INTO `salle` VALUES (1,'salle de dojo'),(2,'salle de reunion'),(3,'salle de repos'),(4,'cuisine'),(5,'bureau'),(6,'open space');
- /*!40000 ALTER TABLE `salle` ENABLE KEYS */;
- UNLOCK TABLES;
- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
- /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
- /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
- /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
- -- Dump completed on 2017-11-19 15:50:37
Add Comment
Please, Sign In to add comment