salix/db/versions/10827-purpleRaphis/00-firstScript.sql

11 lines
435 B
MySQL
Raw Permalink Normal View History

2024-01-25 16:33:54 +00:00
-- Place your SQL code here
CREATE TABLE `vn`.`negativeOrigin` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`itemFk` INT NOT NULL,
`type` ENUM('FALTAS', 'CONTENEDOR', 'ENTRADAS', 'OVERBOOKING') NOT NULL,
`dated` DATE DEFAULT CURRENT_DATE,
`quantity` DECIMAL(10,2) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_constraint` (`itemFk`, `type`, `dated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;