update pre-requisite checks as per monique
authorGreg Pazo <gpazo@xtuple.com>
Fri, 20 Jun 2014 20:49:35 +0000 (16:49 -0400)
committerGreg Pazo <gpazo@xtuple.com>
Fri, 20 Jun 2014 20:49:35 +0000 (16:49 -0400)
scripts/xml/distribution_install.xml
scripts/xml/distribution_package.xml
scripts/xml/xtmfg_install.xml

index d144d13..1e14b58 100644 (file)
@@ -7,7 +7,7 @@
   <prerequisite type = "query"
                 name = "Checking xTuple Edition" >
     <query>SELECT fetchMetricText('Application') = 'PostBooks';</query>
-    <message>This package must be applied to a Distribution database.</message>
+    <message>This package must be applied to a PostBooks database.</message>
   </prerequisite>
 
   <prerequisite type = "query"
@@ -38,7 +38,7 @@
                         FROM payco
                         GROUP BY payco_ccpay_id, payco_cohead_id
                         ORDER BY 1)
-      SELECT COALESCE(MAX(freq), 1) <= 1
+      SELECT (COALESCE(MAX(freq), 1) = 0 OR COALESCE(MAX(freq), 1) = 1)
       FROM counter;
     </query>
     <message>There are duplicate payco_ccpay_id and payco_cohead_id on the payco table. Please see your system administrator or contact xTuple.
index f798144..48d0027 100644 (file)
     </message>
   </prerequisite>
 
+ <prerequisite type = "query"
+               name = "Checking for xwd schema" >
+    <query>SELECT NOT EXISTS(SELECT 1 FROM pg_namespace WHERE nspname = 'xwd');</query>
+    <message>This package requires that XWD 240 package to be installed before continuing.</message>
+  </prerequisite>
+
   <script file="postbooks_upgrade.sql" />
   <script file="inventory_upgrade.sql" />
   <script file="distribution_upgrade.sql" />
index b4c061a..4f7e97b 100644 (file)
@@ -7,7 +7,7 @@
   <prerequisite type = "query"
                 name = "Checking xTuple Edition" >
     <query>SELECT fetchMetricText('Application') = 'PostBooks';</query>
-    <message>This package must be applied to a Distribution Edition database.</message>
+    <message>This package must be applied to a PostBooks Edition database.</message>
   </prerequisite>
 
   <prerequisite type = "query"
@@ -38,7 +38,7 @@
                         FROM payco
                         GROUP BY payco_ccpay_id, payco_cohead_id
                         ORDER BY 1)
-      SELECT COALESCE(MAX(freq), 1) <= 1
+      SELECT (COALESCE(MAX(freq), 1) = 0 OR COALESCE(MAX(freq), 1) = 1)
       FROM counter;
     </query>
     <message>There are duplicate payco_ccpay_id and payco_cohead_id on the payco table. Please see your system administrator or contact xTuple.