This commit is contained in:
parent
f85267db92
commit
4bd28c62b9
|
@ -1,14 +1,16 @@
|
||||||
CREATE TABLE IF NOT EXISTS `vn`.`itemCampaignQuantity` (
|
CREATE TABLE IF NOT EXISTS `vn`.`itemCampaignQuantity` (
|
||||||
|
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
dated date NOT NULL,
|
dated date NOT NULL,
|
||||||
itemFk int(11) NOT NULL,
|
itemFk int(11) NOT NULL,
|
||||||
quantity decimal(10,2) NOT NULL,
|
quantity decimal(10,2) NOT NULL,
|
||||||
campaign varchar(100) NOT NULL,
|
campaign varchar(100) NOT NULL,
|
||||||
CONSTRAINT itemCampaignQuantity_pk PRIMARY KEY (dated,itemFk),
|
UNIQUE KEY `itemCampaignQuantity_UNIQUE` (`dated`,`itemFk`),
|
||||||
CONSTRAINT itemCampaignQuantity_item_FK FOREIGN KEY (itemFk) REFERENCES vn.item(id) ON DELETE RESTRICT ON UPDATE CASCADE
|
CONSTRAINT itemCampaignQuantity_item_FK FOREIGN KEY (itemFk) REFERENCES vn.item(id) ON DELETE RESTRICT ON UPDATE CASCADE
|
||||||
)
|
)
|
||||||
ENGINE=InnoDB
|
ENGINE=InnoDB
|
||||||
DEFAULT CHARSET=utf8mb3
|
DEFAULT CHARSET=utf8mb3
|
||||||
COLLATE=utf8mb3_unicode_ci;
|
COLLATE=utf8mb3_unicode_ci
|
||||||
|
COMMENT='Tallos confirmados por día en los días de más producción de una campaña';
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `vn`.`itemCampaignQuantityConfig` (
|
CREATE TABLE IF NOT EXISTS `vn`.`itemCampaignQuantityConfig` (
|
||||||
id int(10) unsigned NOT NULL PRIMARY KEY,
|
id int(10) unsigned NOT NULL PRIMARY KEY,
|
||||||
|
|
Loading…
Reference in New Issue