onzulin

domotica-database-mysql

Mar 28th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.84 KB | None | 0 0
  1. /* comentario como si estuvieramos en C#
  2. Base de datos SQL que me crea la migración que he hecho y he probado parece que esta completa la base de datos pero con los nombres cambiados, no se si fnucionara por eso lo he subido a una rama llamada test donde voy a ir haciendo todas las pruebas que vaya realizando y documentando todos los fallos
  3. */
  4. -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
  5. --
  6. -- Host: 127.0.0.1 Database: domotica
  7. -- ------------------------------------------------------
  8. -- Server version 8.0.15
  9.  
  10. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  11. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  12. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  13. SET NAMES utf8 ;
  14. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  15. /*!40103 SET TIME_ZONE='+00:00' */;
  16. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  17. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  18. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  19. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  20.  
  21. --
  22. -- Table structure for table `__efmigrationshistory`
  23. --
  24.  
  25. DROP TABLE IF EXISTS `__efmigrationshistory`;
  26. /*!40101 SET @saved_cs_client = @@character_set_client */;
  27. SET character_set_client = utf8mb4 ;
  28. CREATE TABLE `__efmigrationshistory` (
  29. `MigrationId` text COLLATE utf8_unicode_ci NOT NULL,
  30. `ProductVersion` text COLLATE utf8_unicode_ci NOT NULL,
  31. PRIMARY KEY (`MigrationId`(255))
  32. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  33. /*!40101 SET character_set_client = @saved_cs_client */;
  34.  
  35. --
  36. -- Dumping data for table `__efmigrationshistory`
  37. --
  38.  
  39. LOCK TABLES `__efmigrationshistory` WRITE;
  40. /*!40000 ALTER TABLE `__efmigrationshistory` DISABLE KEYS */;
  41. INSERT INTO `__efmigrationshistory` VALUES ('20190327153333_[M1]','2.2.3-servicing-35854');
  42. /*!40000 ALTER TABLE `__efmigrationshistory` ENABLE KEYS */;
  43. UNLOCK TABLES;
  44.  
  45. --
  46. -- Table structure for table `roleclaims`
  47. --
  48.  
  49. DROP TABLE IF EXISTS `roleclaims`;
  50. /*!40101 SET @saved_cs_client = @@character_set_client */;
  51. SET character_set_client = utf8mb4 ;
  52. CREATE TABLE `roleclaims` (
  53. `Id` int(11) NOT NULL AUTO_INCREMENT,
  54. `RoleId` text COLLATE utf8_unicode_ci,
  55. `ClaimType` text COLLATE utf8_unicode_ci,
  56. `ClaimValue` text COLLATE utf8_unicode_ci,
  57. PRIMARY KEY (`Id`)
  58. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  59. /*!40101 SET character_set_client = @saved_cs_client */;
  60.  
  61. --
  62. -- Dumping data for table `roleclaims`
  63. --
  64.  
  65. LOCK TABLES `roleclaims` WRITE;
  66. /*!40000 ALTER TABLE `roleclaims` DISABLE KEYS */;
  67. /*!40000 ALTER TABLE `roleclaims` ENABLE KEYS */;
  68. UNLOCK TABLES;
  69.  
  70. --
  71. -- Table structure for table `roles`
  72. --
  73.  
  74. DROP TABLE IF EXISTS `roles`;
  75. /*!40101 SET @saved_cs_client = @@character_set_client */;
  76. SET character_set_client = utf8mb4 ;
  77. CREATE TABLE `roles` (
  78. `Id` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  79. `Name` text COLLATE utf8_unicode_ci,
  80. `NormalizedName` text COLLATE utf8_unicode_ci,
  81. `ConcurrencyStamp` text COLLATE utf8_unicode_ci,
  82. PRIMARY KEY (`Id`)
  83. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  84. /*!40101 SET character_set_client = @saved_cs_client */;
  85.  
  86. --
  87. -- Dumping data for table `roles`
  88. --
  89.  
  90. LOCK TABLES `roles` WRITE;
  91. /*!40000 ALTER TABLE `roles` DISABLE KEYS */;
  92. /*!40000 ALTER TABLE `roles` ENABLE KEYS */;
  93. UNLOCK TABLES;
  94.  
  95. --
  96. -- Table structure for table `userclaims`
  97. --
  98.  
  99. DROP TABLE IF EXISTS `userclaims`;
  100. /*!40101 SET @saved_cs_client = @@character_set_client */;
  101. SET character_set_client = utf8mb4 ;
  102. CREATE TABLE `userclaims` (
  103. `Id` int(11) NOT NULL AUTO_INCREMENT,
  104. `UserId` text COLLATE utf8_unicode_ci,
  105. `ClaimType` text COLLATE utf8_unicode_ci,
  106. `ClaimValue` text COLLATE utf8_unicode_ci,
  107. PRIMARY KEY (`Id`)
  108. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  109. /*!40101 SET character_set_client = @saved_cs_client */;
  110.  
  111. --
  112. -- Dumping data for table `userclaims`
  113. --
  114.  
  115. LOCK TABLES `userclaims` WRITE;
  116. /*!40000 ALTER TABLE `userclaims` DISABLE KEYS */;
  117. /*!40000 ALTER TABLE `userclaims` ENABLE KEYS */;
  118. UNLOCK TABLES;
  119.  
  120. --
  121. -- Table structure for table `userlogins`
  122. --
  123.  
  124. DROP TABLE IF EXISTS `userlogins`;
  125. /*!40101 SET @saved_cs_client = @@character_set_client */;
  126. SET character_set_client = utf8mb4 ;
  127. CREATE TABLE `userlogins` (
  128. `LoginProvider` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  129. `ProviderKey` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  130. `ProviderDisplayName` text COLLATE utf8_unicode_ci,
  131. `UserId` text COLLATE utf8_unicode_ci,
  132. PRIMARY KEY (`LoginProvider`,`ProviderKey`)
  133. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  134. /*!40101 SET character_set_client = @saved_cs_client */;
  135.  
  136. --
  137. -- Dumping data for table `userlogins`
  138. --
  139.  
  140. LOCK TABLES `userlogins` WRITE;
  141. /*!40000 ALTER TABLE `userlogins` DISABLE KEYS */;
  142. /*!40000 ALTER TABLE `userlogins` ENABLE KEYS */;
  143. UNLOCK TABLES;
  144.  
  145. --
  146. -- Table structure for table `userroles`
  147. --
  148.  
  149. DROP TABLE IF EXISTS `userroles`;
  150. /*!40101 SET @saved_cs_client = @@character_set_client */;
  151. SET character_set_client = utf8mb4 ;
  152. CREATE TABLE `userroles` (
  153. `UserId` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  154. `RoleId` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  155. PRIMARY KEY (`UserId`,`RoleId`)
  156. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  157. /*!40101 SET character_set_client = @saved_cs_client */;
  158.  
  159. --
  160. -- Dumping data for table `userroles`
  161. --
  162.  
  163. LOCK TABLES `userroles` WRITE;
  164. /*!40000 ALTER TABLE `userroles` DISABLE KEYS */;
  165. /*!40000 ALTER TABLE `userroles` ENABLE KEYS */;
  166. UNLOCK TABLES;
  167.  
  168. --
  169. -- Table structure for table `users`
  170. --
  171.  
  172. DROP TABLE IF EXISTS `users`;
  173. /*!40101 SET @saved_cs_client = @@character_set_client */;
  174. SET character_set_client = utf8mb4 ;
  175. CREATE TABLE `users` (
  176. `Id` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  177. `UserName` text COLLATE utf8_unicode_ci,
  178. `NormalizedUserName` text COLLATE utf8_unicode_ci,
  179. `Email` text COLLATE utf8_unicode_ci,
  180. `NormalizedEmail` text COLLATE utf8_unicode_ci,
  181. `EmailConfirmed` bit(1) NOT NULL,
  182. `PasswordHash` text COLLATE utf8_unicode_ci,
  183. `SecurityStamp` text COLLATE utf8_unicode_ci,
  184. `ConcurrencyStamp` text COLLATE utf8_unicode_ci,
  185. `PhoneNumber` text COLLATE utf8_unicode_ci,
  186. `PhoneNumberConfirmed` bit(1) NOT NULL,
  187. `TwoFactorEnabled` bit(1) NOT NULL,
  188. `LockoutEnd` timestamp NULL DEFAULT NULL,
  189. `LockoutEnabled` bit(1) NOT NULL,
  190. `AccessFailedCount` int(11) NOT NULL,
  191. PRIMARY KEY (`Id`)
  192. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  193. /*!40101 SET character_set_client = @saved_cs_client */;
  194.  
  195. --
  196. -- Dumping data for table `users`
  197. --
  198.  
  199. LOCK TABLES `users` WRITE;
  200. /*!40000 ALTER TABLE `users` DISABLE KEYS */;
  201. /*!40000 ALTER TABLE `users` ENABLE KEYS */;
  202. UNLOCK TABLES;
  203.  
  204. --
  205. -- Table structure for table `usertokens`
  206. --
  207.  
  208. DROP TABLE IF EXISTS `usertokens`;
  209. /*!40101 SET @saved_cs_client = @@character_set_client */;
  210. SET character_set_client = utf8mb4 ;
  211. CREATE TABLE `usertokens` (
  212. `UserId` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  213. `LoginProvider` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  214. `Name` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL,
  215. `Value` text COLLATE utf8_unicode_ci,
  216. PRIMARY KEY (`UserId`,`LoginProvider`)
  217. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  218. /*!40101 SET character_set_client = @saved_cs_client */;
  219.  
  220. --
  221. -- Dumping data for table `usertokens`
  222. --
  223.  
  224. LOCK TABLES `usertokens` WRITE;
  225. /*!40000 ALTER TABLE `usertokens` DISABLE KEYS */;
  226. /*!40000 ALTER TABLE `usertokens` ENABLE KEYS */;
  227. UNLOCK TABLES;
  228.  
  229. --
  230. -- Table structure for table `usuarios`
  231. --
  232.  
  233. DROP TABLE IF EXISTS `usuarios`;
  234. /*!40101 SET @saved_cs_client = @@character_set_client */;
  235. SET character_set_client = utf8mb4 ;
  236. CREATE TABLE `usuarios` (
  237. `ID` int(11) NOT NULL AUTO_INCREMENT,
  238. `Nombre` text COLLATE utf8_unicode_ci,
  239. `Apellido` text COLLATE utf8_unicode_ci,
  240. `DNI` text COLLATE utf8_unicode_ci,
  241. `Imagen` text COLLATE utf8_unicode_ci,
  242. `Iduser` text COLLATE utf8_unicode_ci,
  243. PRIMARY KEY (`ID`)
  244. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  245. /*!40101 SET character_set_client = @saved_cs_client */;
  246.  
  247. --
  248. -- Dumping data for table `usuarios`
  249. --
  250.  
  251. LOCK TABLES `usuarios` WRITE;
  252. /*!40000 ALTER TABLE `usuarios` DISABLE KEYS */;
  253. /*!40000 ALTER TABLE `usuarios` ENABLE KEYS */;
  254. UNLOCK TABLES;
  255. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  256.  
  257. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  258. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  259. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  260. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  261. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  262. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  263. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  264.  
  265. -- Dump completed on 2019-03-28 11:42:00
Add Comment
Please, Sign In to add comment