From b111aa6282b49505fa623a605afb9aa35f210eaf Mon Sep 17 00:00:00 2001 From: onsaliyo Date: Thu, 25 Mar 2021 17:27:05 +0100 Subject: [PATCH] =?UTF-8?q?script=20de=20DB=20a=C3=B1adido?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbscript.sql | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 dbscript.sql diff --git a/dbscript.sql b/dbscript.sql new file mode 100644 index 0000000..2f480c5 --- /dev/null +++ b/dbscript.sql @@ -0,0 +1,64 @@ +-- -------------------------------------------------------- +-- Host: localhost +-- Versión del servidor: 10.5.8-MariaDB - mariadb.org binary distribution +-- SO del servidor: Win64 +-- HeidiSQL Versión: 11.0.0.5919 +-- -------------------------------------------------------- + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8 */; +/*!50503 SET NAMES utf8mb4 */; +/*!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' */; + + +-- Volcando estructura de base de datos para discofy +CREATE DATABASE IF NOT EXISTS `discofy` /*!40100 DEFAULT CHARACTER SET latin1 */; +USE `discofy`; + +-- Volcando estructura para tabla discofy.discoteca +CREATE TABLE IF NOT EXISTS `discoteca` ( + `discotecaID` tinyint(4) NOT NULL AUTO_INCREMENT, + `nombre` char(50) NOT NULL DEFAULT '0', + `telefono` char(50) NOT NULL DEFAULT '0', + `localizacion` char(50) NOT NULL DEFAULT '0', + PRIMARY KEY (`discotecaID`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; + +-- La exportación de datos fue deseleccionada. + +-- Volcando estructura para tabla discofy.evento +CREATE TABLE IF NOT EXISTS `evento` ( + `id` tinyint(4) NOT NULL AUTO_INCREMENT, + `discotecaID` tinyint(4) NOT NULL, + `nombre` tinytext NOT NULL DEFAULT '', + `localizacion` tinytext NOT NULL DEFAULT '', + `fecha` date NOT NULL DEFAULT curdate(), + `hora` time NOT NULL DEFAULT curtime(), + `descripcion` text DEFAULT NULL, + `precio1` tinyint(4) DEFAULT NULL, + `precio2` tinyint(4) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_DiscotecaEvento` (`discotecaID`), + CONSTRAINT `FK_DiscotecaEvento` FOREIGN KEY (`discotecaID`) REFERENCES `discoteca` (`discotecaID`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; + +-- La exportación de datos fue deseleccionada. + +-- Volcando estructura para tabla discofy.user +CREATE TABLE IF NOT EXISTS `user` ( + `userID` tinyint(4) NOT NULL AUTO_INCREMENT, + `discotecaID` tinyint(4) NOT NULL, + `userType` tinyint(4) NOT NULL DEFAULT 0, + `username` tinytext DEFAULT NULL, + `password` char(50) DEFAULT NULL, + PRIMARY KEY (`userID`), + KEY `FK_Discoteca` (`discotecaID`), + CONSTRAINT `FK_Discoteca` FOREIGN KEY (`discotecaID`) REFERENCES `discoteca` (`discotecaID`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; + +-- La exportación de datos fue deseleccionada. + +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;