CREATE DATABASE  IF NOT EXISTS `151_ldm_db_recipe` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `151_ldm_db_recipe`;
-- MySQL dump 10.13  Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost    Database: 151_ldm_db_recipe
-- ------------------------------------------------------
-- Server version	5.7.31

/*!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 */;

--
-- Table structure for table `t_ingredient`
--

DROP TABLE IF EXISTS `t_ingredient`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_ingredient` (
  `PK_Ingredient` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(45) NOT NULL,
  PRIMARY KEY (`PK_Ingredient`),
  UNIQUE KEY `Name_UNIQUE` (`Name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `t_ingredient`
--

LOCK TABLES `t_ingredient` WRITE;
/*!40000 ALTER TABLE `t_ingredient` DISABLE KEYS */;
INSERT INTO `t_ingredient` VALUES (2,'papet vaudois'),(1,'vous');
/*!40000 ALTER TABLE `t_ingredient` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_recipe`
--

DROP TABLE IF EXISTS `t_recipe`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_recipe` (
  `PK_Recipe` int(11) NOT NULL AUTO_INCREMENT,
  `FK_User` int(11) NOT NULL,
  `Name` varchar(45) DEFAULT NULL,
  `Description` text,
  `Image` text,
  PRIMARY KEY (`PK_Recipe`),
  KEY `fk_T_Recipe_T_User_idx` (`FK_User`),
  CONSTRAINT `fk_T_Recipe_T_User` FOREIGN KEY (`FK_User`) REFERENCES `t_user` (`PK_User`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `t_recipe`
--

LOCK TABLES `t_recipe` WRITE;
/*!40000 ALTER TABLE `t_recipe` DISABLE KEYS */;
INSERT INTO `t_recipe` VALUES (1,1,'papet vaudois','c\'est délicieux','http://image.over-blog.com/lPSFDrxD1cCe3ReVC-jde6WeJjA=/filters:no_upscale()/image%2F1029700%2F20201004%2Fob_f708de_20200928-195703-2.jpg');
/*!40000 ALTER TABLE `t_recipe` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_step`
--

DROP TABLE IF EXISTS `t_step`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_step` (
  `PK_Step` int(11) NOT NULL AUTO_INCREMENT,
  `Priority` int(11) NOT NULL,
  `Description` text NOT NULL,
  `FK_Recipe` int(11) NOT NULL,
  PRIMARY KEY (`PK_Step`),
  KEY `fk_T_Step_T_Recipe1_idx` (`FK_Recipe`),
  CONSTRAINT `fk_T_Step_T_Recipe1` FOREIGN KEY (`FK_Recipe`) REFERENCES `t_recipe` (`PK_Recipe`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `t_step`
--

LOCK TABLES `t_step` WRITE;
/*!40000 ALTER TABLE `t_step` DISABLE KEYS */;
INSERT INTO `t_step` VALUES (1,1,'mange le papet',1),(2,2,'digeste le papet',1);
/*!40000 ALTER TABLE `t_step` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_user`
--

DROP TABLE IF EXISTS `t_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_user` (
  `PK_User` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(45) NOT NULL,
  `Email` varchar(45) NOT NULL,
  `Password` text NOT NULL,
  `Description` text,
  `AvatarPath` text,
  PRIMARY KEY (`PK_User`),
  UNIQUE KEY `Email_UNIQUE` (`Email`),
  UNIQUE KEY `Name_UNIQUE` (`Name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `t_user`
--

LOCK TABLES `t_user` WRITE;
/*!40000 ALTER TABLE `t_user` DISABLE KEYS */;
INSERT INTO `t_user` VALUES (1,'Jura','lucadiasmadeira@gmail.com','12345','c\'est moi mdr','https://pbs.twimg.com/profile_images/781518772259749888/lmEHgoQP_400x400.jpg'),(2,'nomtest','email@test.com','passwordtest',NULL,'https://i.pinimg.com/originals/60/99/f3/6099f305983371dadaceae99f5c905bf.png'),(3,'juju','me@me.com','$2y$10$gnieCYPvIjRrU.EXRyixRe8Y.7p4la1YlUPuoFBEJjAyZeUCcV8Se','sfnetjtdetenh6rhtehrtwhtrhrtwh6rze5urwuw','https://i.pinimg.com/originals/60/99/f3/6099f305983371dadaceae99f5c905bf.png');
/*!40000 ALTER TABLE `t_user` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tr_recipe_ingredient`
--

DROP TABLE IF EXISTS `tr_recipe_ingredient`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tr_recipe_ingredient` (
  `FPK_Ingredient` int(11) NOT NULL,
  `FPK_Recipe` int(11) NOT NULL,
  `Quantity` varchar(45) NOT NULL,
  PRIMARY KEY (`FPK_Ingredient`,`FPK_Recipe`),
  KEY `fk_T_Ingredient_has_T_Recipe_T_Recipe1_idx` (`FPK_Recipe`),
  KEY `fk_T_Ingredient_has_T_Recipe_T_Ingredient1_idx` (`FPK_Ingredient`),
  CONSTRAINT `fk_T_Ingredient_has_T_Recipe_T_Ingredient1` FOREIGN KEY (`FPK_Ingredient`) REFERENCES `t_ingredient` (`PK_Ingredient`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_T_Ingredient_has_T_Recipe_T_Recipe1` FOREIGN KEY (`FPK_Recipe`) REFERENCES `t_recipe` (`PK_Recipe`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tr_recipe_ingredient`
--

LOCK TABLES `tr_recipe_ingredient` WRITE;
/*!40000 ALTER TABLE `tr_recipe_ingredient` DISABLE KEYS */;
INSERT INTO `tr_recipe_ingredient` VALUES (1,1,'une portion'),(2,1,'3dl');
/*!40000 ALTER TABLE `tr_recipe_ingredient` 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 2022-03-11 16:38:28
