Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. -- MySQL dump 10.13 Distrib 5.6.24, for osx10.10 (x86_64)
  2. --
  3. -- Host: localhost Database: pedro_development
  4. -- ------------------------------------------------------
  5. -- Server version 5.6.24
  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 `lojas`
  20. --
  21.  
  22. DROP TABLE IF EXISTS `lojas`;
  23. /*!40101 SET @saved_cs_client = @@character_set_client */;
  24. /*!40101 SET character_set_client = utf8 */;
  25. CREATE TABLE `lojas` (
  26. `id` int(11) NOT NULL AUTO_INCREMENT,
  27. `nome` varchar(255) DEFAULT NULL,
  28. `id_usuario` int(11) DEFAULT NULL,
  29. PRIMARY KEY (`id`),
  30. KEY `index_lojas_on_id_usuario` (`id_usuario`),
  31. CONSTRAINT `fk_bb6775cb2d` FOREIGN KEY (`id_usuario`) REFERENCES `usuarios` (`id`) ON DELETE CASCADE
  32. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  33. /*!40101 SET character_set_client = @saved_cs_client */;
  34.  
  35. --
  36. -- Dumping data for table `lojas`
  37. --
  38.  
  39. LOCK TABLES `lojas` WRITE;
  40. /*!40000 ALTER TABLE `lojas` DISABLE KEYS */;
  41. /*!40000 ALTER TABLE `lojas` ENABLE KEYS */;
  42. UNLOCK TABLES;
  43.  
  44. --
  45. -- Table structure for table `lojas_nichos`
  46. --
  47.  
  48. DROP TABLE IF EXISTS `lojas_nichos`;
  49. /*!40101 SET @saved_cs_client = @@character_set_client */;
  50. /*!40101 SET character_set_client = utf8 */;
  51. CREATE TABLE `lojas_nichos` (
  52. `id` int(11) NOT NULL AUTO_INCREMENT,
  53. `id_loja` int(11) DEFAULT NULL,
  54. `id_nicho` int(11) DEFAULT NULL,
  55. PRIMARY KEY (`id`),
  56. KEY `index_lojas_nichos_on_id_loja` (`id_loja`),
  57. KEY `index_lojas_nichos_on_id_nicho` (`id_nicho`),
  58. CONSTRAINT `fk_7d64784a8d` FOREIGN KEY (`id_nicho`) REFERENCES `nichos` (`id`) ON DELETE CASCADE,
  59. CONSTRAINT `fk_f7ee66978a` FOREIGN KEY (`id_loja`) REFERENCES `lojas` (`id`) ON DELETE CASCADE
  60. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  61. /*!40101 SET character_set_client = @saved_cs_client */;
  62.  
  63. --
  64. -- Dumping data for table `lojas_nichos`
  65. --
  66.  
  67. LOCK TABLES `lojas_nichos` WRITE;
  68. /*!40000 ALTER TABLE `lojas_nichos` DISABLE KEYS */;
  69. /*!40000 ALTER TABLE `lojas_nichos` ENABLE KEYS */;
  70. UNLOCK TABLES;
  71.  
  72. --
  73. -- Table structure for table `nichos`
  74. --
  75.  
  76. DROP TABLE IF EXISTS `nichos`;
  77. /*!40101 SET @saved_cs_client = @@character_set_client */;
  78. /*!40101 SET character_set_client = utf8 */;
  79. CREATE TABLE `nichos` (
  80. `id` int(11) NOT NULL AUTO_INCREMENT,
  81. `nome` varchar(255) DEFAULT NULL,
  82. PRIMARY KEY (`id`)
  83. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  84. /*!40101 SET character_set_client = @saved_cs_client */;
  85.  
  86. --
  87. -- Dumping data for table `nichos`
  88. --
  89.  
  90. LOCK TABLES `nichos` WRITE;
  91. /*!40000 ALTER TABLE `nichos` DISABLE KEYS */;
  92. /*!40000 ALTER TABLE `nichos` ENABLE KEYS */;
  93. UNLOCK TABLES;
  94.  
  95. --
  96. -- Table structure for table `produtos`
  97. --
  98.  
  99. DROP TABLE IF EXISTS `produtos`;
  100. /*!40101 SET @saved_cs_client = @@character_set_client */;
  101. /*!40101 SET character_set_client = utf8 */;
  102. CREATE TABLE `produtos` (
  103. `id` int(11) NOT NULL AUTO_INCREMENT,
  104. `nome` varchar(255) DEFAULT NULL,
  105. `id_loja` int(11) DEFAULT NULL,
  106. PRIMARY KEY (`id`),
  107. KEY `index_produtos_on_id_loja` (`id_loja`),
  108. CONSTRAINT `fk_dbf0e0a2ed` FOREIGN KEY (`id_loja`) REFERENCES `lojas` (`id`) ON DELETE CASCADE
  109. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  110. /*!40101 SET character_set_client = @saved_cs_client */;
  111.  
  112. --
  113. -- Dumping data for table `produtos`
  114. --
  115.  
  116. LOCK TABLES `produtos` WRITE;
  117. /*!40000 ALTER TABLE `produtos` DISABLE KEYS */;
  118. /*!40000 ALTER TABLE `produtos` ENABLE KEYS */;
  119. UNLOCK TABLES;
  120.  
  121. --
  122. -- Table structure for table `usuarios`
  123. --
  124.  
  125. DROP TABLE IF EXISTS `usuarios`;
  126. /*!40101 SET @saved_cs_client = @@character_set_client */;
  127. /*!40101 SET character_set_client = utf8 */;
  128. CREATE TABLE `usuarios` (
  129. `id` int(11) NOT NULL AUTO_INCREMENT,
  130. `nome` varchar(255) DEFAULT NULL,
  131. PRIMARY KEY (`id`)
  132. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  133. /*!40101 SET character_set_client = @saved_cs_client */;
  134.  
  135. --
  136. -- Dumping data for table `usuarios`
  137. --
  138.  
  139. LOCK TABLES `usuarios` WRITE;
  140. /*!40000 ALTER TABLE `usuarios` DISABLE KEYS */;
  141. /*!40000 ALTER TABLE `usuarios` ENABLE KEYS */;
  142. UNLOCK TABLES;
  143. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  144.  
  145. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  146. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  147. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  148. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  149. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  150. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  151. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  152.  
  153. -- Dump completed on 2017-03-24 20:28:20
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement