Skip to content

Instantly share code, notes, and snippets.

@guillaumebdx
Created September 25, 2017 13:49
Show Gist options
  • Save guillaumebdx/715e6d558d47638179bf619385dae18a to your computer and use it in GitHub Desktop.
Save guillaumebdx/715e6d558d47638179bf619385dae18a to your computer and use it in GitHub Desktop.
-- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: localhost Database: wildschool
-- ------------------------------------------------------
-- Server version 5.7.18-0ubuntu0.16.10.1
/*!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: `wildschool`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `wildschool` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `wildschool`;
--
-- 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,
`id_room` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`duree` int(11) NOT NULL,
`date_reservation` date DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `id_room` (`id_room`),
KEY `id_user` (`id_user`),
CONSTRAINT `fk_room_id` FOREIGN KEY (`id_room`) REFERENCES `room` (`id`),
CONSTRAINT `fk_user_id` FOREIGN KEY (`id_user`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
/*!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,1,1,2,'2017-09-25'),(2,1,2,3,'2017-09-25'),(3,1,3,4,'2017-09-26'),(4,5,4,3,'2017-09-25'),(5,5,5,6,'2017-09-27'),(6,3,6,1,'2017-09-28'),(7,6,7,2,'2017-09-25'),(8,6,8,4,'2017-09-28'),(9,6,9,1,'2017-09-28'),(10,6,10,5,'2017-09-26');
/*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `room`
--
DROP TABLE IF EXISTS `room`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `room` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `room`
--
LOCK TABLES `room` WRITE;
/*!40000 ALTER TABLE `room` DISABLE KEYS */;
INSERT INTO `room` VALUES (1,'dojo'),(2,'reunion'),(3,'repos'),(4,'cuisine'),(5,'bureau'),(6,'openspace');
/*!40000 ALTER TABLE `room` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nom` varchar(255) NOT NULL,
`prenom` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'HARARI','GUILLAUME'),(2,'TAMEILLEUREAMIE','LAURIE'),(3,'GOOGLE','ESTTONAMI'),(4,'OBAMA','Barack'),(5,'BUSH','George'),(6,'CLINTON','BILL'),(7,'REAGAN','RONALD'),(8,'CARTER','JIMMY'),(9,'FORD','GERALD'),(10,'NIXON','Richard');
/*!40000 ALTER TABLE `users` 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-09-25 15:48:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment