feat: refs #8030 new field vn.priceDelta.zoneGeoFk
gitea/salix/pipeline/pr-master Build queued...
Details
gitea/salix/pipeline/pr-master Build queued...
Details
This commit is contained in:
parent
bc2ed26fc3
commit
02ef314ed9
|
@ -41,9 +41,12 @@ BEGIN
|
|||
AND (pd.originFk IS NULL OR pd.originFk = i.originFk)
|
||||
AND (pd.producerFk IS NULL OR pd.producerFk = i.producerFk)
|
||||
AND (pd.warehouseFk IS NULL OR pd.warehouseFk = vWarehouseFk)
|
||||
LEFT JOIN zoneGeo zg ON zg.id = pd.zoneGeoFk
|
||||
LEFT JOIN zoneGeo zg2 ON zg2.id = address_getGeo(vAddressFk)
|
||||
WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped)
|
||||
AND (pd.toDated IS NULL OR pd.toDated >= vShipped)
|
||||
GROUP BY i.id;
|
||||
AND (pd.zoneGeoFk IS NULL OR zg2.lft BETWEEN zg.lft AND zg.rgt)
|
||||
GROUP BY itemFk;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice
|
||||
(INDEX (itemFk))
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
-- Place your SQL code here
|
||||
|
||||
ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL;
|
||||
|
||||
ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk)
|
||||
REFERENCES vn.zoneGeo (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
Loading…
Reference in New Issue