Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. CREATE TABLE `adeudado_ot` (
  2. `id` int(11) NOT NULL,
  3. `monto` int(11) NOT NULL,
  4. `ot_documento_id` int(11) NOT NULL
  5. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;
  6.  
  7. --
  8. -- Índices para tablas volcadas
  9. --
  10.  
  11. --
  12. -- Indices de la tabla `adeudado_ot`
  13. --
  14. ALTER TABLE `adeudado_ot`
  15. ADD PRIMARY KEY (`id`),
  16. ADD UNIQUE KEY `unico` (`ot_documento_id`),
  17. ADD KEY `fk_adeudado_ot_ot_documento1_idx` (`ot_documento_id`);
  18.  
  19. --
  20. -- AUTO_INCREMENT de las tablas volcadas
  21. --
  22.  
  23. --
  24. -- AUTO_INCREMENT de la tabla `adeudado_ot`
  25. --
  26. ALTER TABLE `adeudado_ot`
  27. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  28.  
  29. --
  30. -- Restricciones para tablas volcadas
  31. --
  32.  
  33. --
  34. -- Filtros para la tabla `adeudado_ot`
  35. --
  36. ALTER TABLE `adeudado_ot`
  37. ADD CONSTRAINT `fk_adeudado_ot_ot_documento1` FOREIGN KEY (`ot_documento_id`) REFERENCES `ot_documento` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement