feat: refs #8030 new fields for vn.priceDelta #3013
|
@ -1,8 +1,6 @@
|
||||||
-- vn.priceDelta definition
|
-- vn.priceDelta definition
|
||||||
|
|
||||||
-- vn.priceDelta definition
|
CREATE OR REPLACE TABLE vn.priceDelta (
|
||||||
|
|
||||||
CREATE OR REPLACE TABLE vn.`priceDelta` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`itemTypeFk` smallint(5) unsigned NOT NULL,
|
`itemTypeFk` smallint(5) unsigned NOT NULL,
|
||||||
`minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size',
|
`minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size',
|
||||||
|
@ -15,13 +13,19 @@ CREATE OR REPLACE TABLE vn.`priceDelta` (
|
||||||
`absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price',
|
`absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price',
|
||||||
`ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price',
|
`ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price',
|
||||||
`warehouseFk` smallint(6) unsigned NOT NULL,
|
`warehouseFk` smallint(6) unsigned NOT NULL,
|
||||||
|
`created` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||||
|
`editorFk` int(10) unsigned DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `priceDelta_itemType_FK` (`itemTypeFk`),
|
KEY `priceDelta_itemType_FK` (`itemTypeFk`),
|
||||||
KEY `priceDelta_ink_FK` (`inkFk`),
|
KEY `priceDelta_ink_FK` (`inkFk`),
|
||||||
KEY `priceDelta_producer_FK` (`producerFk`),
|
KEY `priceDelta_producer_FK` (`producerFk`),
|
||||||
KEY `priceDelta_warehouse_FK` (`warehouseFk`),
|
KEY `priceDelta_warehouse_FK` (`warehouseFk`),
|
||||||
|
KEY `priceDelta_worker_FK` (`editorFk`),
|
||||||
CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE,
|
CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE,
|
||||||
CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE,
|
CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE,
|
||||||
CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE,
|
CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE,
|
||||||
CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE
|
CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `priceDelta_worker_FK` FOREIGN KEY (`editorFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items';
|
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items';
|
||||||
|
|
||||||
|
GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE vn.priceDelta TO buyer;
|
Loading…
Reference in New Issue