Untitled

 avatar
unknown
plain_text
2 years ago
2.8 kB
4
Indexable
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 25-04-2023 a las 09:23:27
-- Versión del servidor: 10.4.27-MariaDB
-- Versión de PHP: 8.2.0

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `espacios`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `inventarios`
--

CREATE TABLE `inventarios` (
  `idInventarios` int(11) NOT NULL,
  `identificador` varchar(50) NOT NULL DEFAULT '',
  `name` varchar(50) NOT NULL DEFAULT '',
  `modelo` varchar(50) DEFAULT '',
  `marca` varchar(50) DEFAULT '',
  `descripcion` varchar(150) DEFAULT '',
  `cantidad` int(11) NOT NULL,
  `unidad` varchar(50) NOT NULL DEFAULT '',
  `costo` int(11) DEFAULT NULL,
  `notas` longtext DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `habilitado` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0 habilitado | 1 deshabilitado',
  `idEspacios` int(11) DEFAULT NULL,
  `idTipos` int(11) DEFAULT NULL,
  `idEstantes` int(11) DEFAULT NULL,
  `idEtiquetas` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `inventarios`
--
ALTER TABLE `inventarios`
  ADD PRIMARY KEY (`idInventarios`),
  ADD KEY `FK_Inventarios_Espacios` (`idEspacios`),
  ADD KEY `FK_Inventarios_Tipos` (`idTipos`),
  ADD KEY `FK_Inventarios_Estantes` (`idEstantes`),
  ADD KEY `FK_Inventarios_Etiquetas` (`idEtiquetas`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `inventarios`
--
ALTER TABLE `inventarios`
  MODIFY `idInventarios` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `inventarios`
--
ALTER TABLE `inventarios`
  ADD CONSTRAINT `FK_Inventarios_Espacios` FOREIGN KEY (`idEspacios`) REFERENCES `espacio` (`idEspacios`),
  ADD CONSTRAINT `FK_Inventarios_Estantes` FOREIGN KEY (`idEstantes`) REFERENCES `estantes` (`idEstantes`),
  ADD CONSTRAINT `FK_Inventarios_Etiquetas` FOREIGN KEY (`idEtiquetas`) REFERENCES `etiquetas` (`idEtiquetas`),
  ADD CONSTRAINT `FK_Inventarios_Tipos` FOREIGN KEY (`idTipos`) REFERENCES `tipos` (`idTipos`);
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 */;
Editor is loading...