Skip to content

BarbaraSuarez291/tpAppWeb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tpAppWeb

// -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/

-- Servidor: 127.0.0.1 -- Tiempo de generación: 28-10-2021 a las 16:31:35 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.3

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";

/*!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 utf8mb4 */;

-- -- Base de datos: company_crud


-- -- Estructura de tabla para la tabla category

CREATE TABLE category ( id int(11) NOT NULL, category_name varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- -- Volcado de datos para la tabla category

INSERT INTO category (id, category_name) VALUES (1, 'Remera'), (2, 'Pantalones/shorts'), (3, 'Camperas');


-- -- Estructura de tabla para la tabla contactos

CREATE TABLE contactos ( id_contacto int(11) NOT NULL, tipo bit(1) NOT NULL, nombre varchar(50) NOT NULL, apellido varchar(50) DEFAULT NULL, dni varchar(50) DEFAULT NULL, adress varchar(100) DEFAULT NULL, email varchar(50) DEFAULT NULL, telefono varchar(50) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- -- Estructura de tabla para la tabla products

CREATE TABLE products ( id int(11) NOT NULL, name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, product_code int(11) NOT NULL, description text COLLATE utf8mb4_unicode_ci DEFAULT NULL, price double NOT NULL, id_category int(11) NOT NULL, cantidad_talle_s int(3) DEFAULT NULL, cantidad_talle_m int(3) DEFAULT NULL, cantidad_talle_l int(3) DEFAULT NULL, cantidad_total int(5) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- -- Volcado de datos para la tabla products

INSERT INTO products (id, name, product_code, description, price, id_category, cantidad_talle_s, cantidad_talle_m, cantidad_talle_l, cantidad_total) VALUES (15, 'Musculosa', 345, 'Musculosa verde', 567, 1, 5, 0, 0, 5), (19, 'Calza ', 345, 'Calza deportiva', 2065, 2, 50, 20, 0, 70), (20, 'Remera deportiva', 20, 'Remera deportiva ', 2300, 1, 56, 60, 40, 156);


-- -- Estructura de tabla para la tabla users

CREATE TABLE users ( id int(11) NOT NULL, email varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL, password varchar(300) COLLATE utf8mb4_unicode_ci NOT NULL, rol int(1) NOT NULL, nombre varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, apellido varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, dni varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, adress varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, telefono varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- -- Volcado de datos para la tabla users

INSERT INTO users (id, email, password, rol, nombre, apellido, dni, adress, telefono) VALUES (6, 'admin@admin.com', '123123', 1, 'pepe', 'rodriguez', '19569285', NULL, NULL), (7, 'emple@emple.com', '123123', 0, 'Lucia', 'rodriguez', '2339285', NULL, NULL), (71, 'barbarasuarez291@gmail.com', '123123', 1, 'Barbara Nahir', 'Suarez', NULL, NULL, NULL);

-- -- Índices para tablas volcadas

-- -- Indices de la tabla category

ALTER TABLE category ADD PRIMARY KEY (id);

-- -- Indices de la tabla contactos

ALTER TABLE contactos ADD PRIMARY KEY (id_contacto);

-- -- Indices de la tabla products

ALTER TABLE products ADD PRIMARY KEY (id), ADD KEY FK__id_category (id_category);

-- -- Indices de la tabla users

ALTER TABLE users ADD PRIMARY KEY (id);

-- -- AUTO_INCREMENT de las tablas volcadas

-- -- AUTO_INCREMENT de la tabla category

ALTER TABLE category MODIFY id int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

-- -- AUTO_INCREMENT de la tabla contactos

ALTER TABLE contactos MODIFY id_contacto int(11) NOT NULL AUTO_INCREMENT;

-- -- AUTO_INCREMENT de la tabla products

ALTER TABLE products MODIFY id int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

-- -- AUTO_INCREMENT de la tabla users

ALTER TABLE users MODIFY id int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72;

-- -- Restricciones para tablas volcadas

-- -- Filtros para la tabla products

ALTER TABLE products ADD CONSTRAINT products_ibfk_1 FOREIGN KEY (id_category) REFERENCES category (id) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT;

/*!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 */;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors