|
@@ -1,58 +1,84 @@
|
|
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
|
|
|
|
|
|
+-- phpMyAdmin SQL Dump
|
|
|
|
+-- version 4.9.2
|
|
|
|
+-- https://www.phpmyadmin.net/
|
|
--
|
|
--
|
|
--- Host: localhost Database: webApp
|
|
|
|
--- ------------------------------------------------------
|
|
|
|
--- Server version 5.7.28
|
|
|
|
|
|
+-- Servidor: 127.0.0.1:3306
|
|
|
|
+-- Tiempo de generación: 28-05-2020 a las 09:37:55
|
|
|
|
+-- Versión del servidor: 10.4.10-MariaDB
|
|
|
|
+-- Versión de PHP: 7.3.12
|
|
|
|
|
|
-/*!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 */;
|
|
|
|
|
|
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
|
|
+SET AUTOCOMMIT = 0;
|
|
|
|
+START TRANSACTION;
|
|
|
|
+SET time_zone = "+00:00";
|
|
|
|
|
|
--
|
|
--
|
|
--- Table structure for table `usuarios`
|
|
|
|
|
|
+-- Base de datos: `webapp`
|
|
--
|
|
--
|
|
|
|
|
|
-DROP TABLE IF EXISTS `usuarios`;
|
|
|
|
-/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
-/*!40101 SET character_set_client = utf8 */;
|
|
|
|
-CREATE TABLE `usuarios` (
|
|
|
|
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
|
|
- `usuario` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
- `pass` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
- `nombre` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
- `email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
- `role` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
- `token` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
- `ultimoLogin` datetime DEFAULT NULL,
|
|
|
|
- PRIMARY KEY (`id`),
|
|
|
|
- UNIQUE KEY `usuario` (`usuario`),
|
|
|
|
- KEY `token` (`token`)
|
|
|
|
|
|
+-- --------------------------------------------------------
|
|
|
|
+
|
|
|
|
+--
|
|
|
|
+-- Estructura de tabla para la tabla `cuentas`
|
|
|
|
+--
|
|
|
|
+
|
|
|
|
+DROP TABLE IF EXISTS `cuentas`;
|
|
|
|
+CREATE TABLE IF NOT EXISTS `cuentas` (
|
|
|
|
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
|
|
+ `cuenta` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
+ `dir` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
+ `active` tinyint(1) DEFAULT 1,
|
|
|
|
+ PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
-/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
--
|
|
--
|
|
--- Dumping data for table `usuarios`
|
|
|
|
|
|
+-- Volcado de datos para la tabla `cuentas`
|
|
|
|
+--
|
|
|
|
+
|
|
|
|
+INSERT INTO `cuentas` (`id`, `cuenta`, `dir`, `active`) VALUES
|
|
|
|
+(1, 'Cuenta 1', 'cuenta1', 1),
|
|
|
|
+(2, 'Cuenta 2', 'cuenta2', 1);
|
|
|
|
+
|
|
|
|
+-- --------------------------------------------------------
|
|
|
|
+
|
|
|
|
+--
|
|
|
|
+-- Estructura de tabla para la tabla `usuarios`
|
|
--
|
|
--
|
|
|
|
|
|
-LOCK TABLES `usuarios` WRITE;
|
|
|
|
-/*!40000 ALTER TABLE `usuarios` DISABLE KEYS */;
|
|
|
|
-INSERT INTO `usuarios` VALUES (1,'admin','c8837b23ff8aaa8a2dde915473ce0991','Administrador','admin@empresa.com','A','',NULL);
|
|
|
|
-/*!40000 ALTER TABLE `usuarios` ENABLE KEYS */;
|
|
|
|
-UNLOCK TABLES;
|
|
|
|
|
|
+DROP TABLE IF EXISTS `usuarios`;
|
|
|
|
+CREATE TABLE IF NOT EXISTS `usuarios` (
|
|
|
|
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
|
|
+ `usuario` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
|
|
+ `pass` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
+ `nombre` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
+ `email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
+ `role` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
+ `token` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
|
|
+ `ultimoLogin` datetime DEFAULT NULL,
|
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
|
+ UNIQUE KEY `usuario` (`usuario`),
|
|
|
|
+ KEY `token` (`token`)
|
|
|
|
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
+
|
|
|
|
+--
|
|
|
|
+-- Volcado de datos para la tabla `usuarios`
|
|
|
|
+--
|
|
|
|
|
|
-/*!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 */;
|
|
|
|
|
|
+INSERT INTO `usuarios` (`id`, `usuario`, `pass`, `nombre`, `email`, `role`, `token`, `ultimoLogin`) VALUES
|
|
|
|
+(1, 'admin', 'c8837b23ff8aaa8a2dde915473ce0991', 'Administrador', 'admin@empresa.com', 'A', '', NULL);
|
|
|
|
+
|
|
|
|
+-- --------------------------------------------------------
|
|
|
|
+
|
|
|
|
+--
|
|
|
|
+-- Estructura de tabla para la tabla `usuarioscuentas`
|
|
|
|
+--
|
|
|
|
|
|
--- Dump completed on 2019-10-23 22:32:31
|
|
|
|
|
|
+DROP TABLE IF EXISTS `usuarioscuentas`;
|
|
|
|
+CREATE TABLE IF NOT EXISTS `usuarioscuentas` (
|
|
|
|
+ `usuario_id` bigint(20) NOT NULL,
|
|
|
|
+ `cuenta_id` bigint(20) NOT NULL,
|
|
|
|
+ `role` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
+ PRIMARY KEY (`usuario_id`,`cuenta_id`),
|
|
|
|
+ UNIQUE KEY `cuenta_id` (`cuenta_id`,`usuario_id`) USING BTREE
|
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
+COMMIT;
|