From 40db0c414d91bf0eecb95e2dda322966a2e6f5fc Mon Sep 17 00:00:00 2001 From: dantam Date: Thu, 4 Apr 2013 14:20:35 +0200 Subject: [PATCH] IDEMPIERE-830 Possible problem when running DB-scripts 950_IDEMPIERE-234 and 201211141733_IDEMPIERE-385-m_viewProduct.sql --- migration/360lts-i1.0a/postgresql/950_IDEMPIERE-234.sql | 3 +++ .../postgresql/201211141733_IDEMPIERE-385_m_viewProduct.sql | 2 ++ 2 files changed, 5 insertions(+) diff --git a/migration/360lts-i1.0a/postgresql/950_IDEMPIERE-234.sql b/migration/360lts-i1.0a/postgresql/950_IDEMPIERE-234.sql index f0ef9dc170..0d1d28ab59 100644 --- a/migration/360lts-i1.0a/postgresql/950_IDEMPIERE-234.sql +++ b/migration/360lts-i1.0a/postgresql/950_IDEMPIERE-234.sql @@ -1,3 +1,4 @@ +DROP VIEW AD_TAB_V; CREATE OR REPLACE VIEW AD_TAB_V (AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME, DESCRIPTION, HELP, SEQNO, ISSINGLEROW, HASTREE, ISINFOTAB, @@ -22,6 +23,7 @@ FROM AD_Tab t WHERE t.IsActive='Y' AND tbl.IsActive='Y'; +DROP VIEW AD_TAB_VT; CREATE OR REPLACE VIEW AD_TAB_VT (AD_LANGUAGE, AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME, DESCRIPTION, HELP, SEQNO, ISSINGLEROW, HASTREE, @@ -47,6 +49,7 @@ FROM AD_Tab t WHERE t.IsActive='Y' AND tbl.IsActive='Y'; +DROP VIEW AD_WINDOW_VT; CREATE OR REPLACE VIEW AD_WINDOW_VT (AD_LANGUAGE, AD_WINDOW_ID, NAME, DESCRIPTION, HELP, WINDOWTYPE, AD_COLOR_ID, AD_IMAGE_ID, ISACTIVE, WINWIDTH, diff --git a/migration/i1.0a-release/postgresql/201211141733_IDEMPIERE-385_m_viewProduct.sql b/migration/i1.0a-release/postgresql/201211141733_IDEMPIERE-385_m_viewProduct.sql index 8df924bef8..e8e78a2a80 100644 --- a/migration/i1.0a-release/postgresql/201211141733_IDEMPIERE-385_m_viewProduct.sql +++ b/migration/i1.0a-release/postgresql/201211141733_IDEMPIERE-385_m_viewProduct.sql @@ -1,3 +1,4 @@ +DROP VIEW m_product_stock_v; CREATE OR REPLACE VIEW m_product_stock_v AS SELECT ms.isactive, ms.created, ms.createdby, ms.updated, ms.updatedby, mp.value, mp.help, ms.qtyonhand - coalesce(mr.qty,0) AS qtyavailable, ms.qtyonhand, coalesce(mr.qty,0) as qtyreserved, mp.description, mw.name AS warehouse, mw.m_warehouse_id, mw.ad_client_id, mw.ad_org_id, mp.documentnote FROM m_storageonhand ms @@ -7,6 +8,7 @@ CREATE OR REPLACE VIEW m_product_stock_v AS LEFT JOIN m_storagereservation mr ON ms.m_product_id = mr.m_product_id AND mw.m_warehouse_id = mr.m_warehouse_id AND mr.isSOTrx='Y' ORDER BY mw.name; +DROP VIEW m_product_substituterelated_v; CREATE OR REPLACE VIEW m_product_substituterelated_v AS SELECT s.ad_client_id, s.ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.m_product_id, s.substitute_id, 'S'::text AS rowtype, mp.name, sum(ms.qtyonhand - coalesce(mr.qty,0)) AS qtyavailable, sum(ms.qtyonhand) AS qtyonhand, coalesce(sum(mr.qty),0) AS qtyreserved, round(max(mpr.pricestd), 0) AS pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id, org.name AS orgname FROM m_substitute s