test #2142

Merged
carlosap merged 7 commits from test into dev 2024-03-06 16:16:17 +00:00
2 changed files with 9 additions and 1 deletions

View File

@ -39,11 +39,11 @@ BEGIN
WHERE t.landed BETWEEN vStarted AND vEnded
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
AND b.price2 > 0
AND b.quantity > 0
ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC
LIMIT 10000000000000000000) sub
GROUP BY itemFk, warehouseFk;
INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored)
SELECT
b.itemFk,

View File

@ -0,0 +1,8 @@
ALTER TABLE vn.department
ADD COLUMN pbxQueue varchar(128) CHARACTER
SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL NULL;
ALTER TABLE vn.department
ADD CONSTRAINT department_queue_FK
FOREIGN KEY (pbxQueue) REFERENCES pbx.queue(name) ON DELETE RESTRICT ON UPDATE CASCADE;