1 <package id = "manufacturing-upgrade-460"
4 descrip = "load PostBooks resources"
7 <prerequisite type = "query"
8 name = "Checking xTuple Edition" >
9 <query>SELECT fetchMetricText('Application') = 'Standard';</query>
10 <message>This package must be applied to a Manufacturing Edition database.</message>
13 <prerequisite type="query"
14 name ="Checking xtmfg package" >
15 <query>SELECT TRUE FROM pkghead WHERE pkghead_name = 'xtmfg';</query>
16 <message>This package must be applied to an xTuple ERP database that already contains the xtmfg package.</message>
19 <prerequisite type="query" name="Checking xtmfg Package Version">
20 <query>SELECT TRUE FROM pkghead WHERE pkghead_name = 'xtmfg' AND (pkghead_version >= '4.4');</query>
21 <message>This package must be applied against the 4.4+ version of the xtmfg package.</message>
24 <prerequisite type = "query"
25 name = "Checking for too-old xTuple ERP database version" >
26 <query>SELECT fetchMetricText('ServerVersion') > '4.4.';</query>
27 <message>This package must be applied to a 4.4+ database.
31 <prerequisite type = "query"
32 name = "Checking for too-new xTuple ERP database version" >
33 <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.6.1';</query>
34 <message>This package may not be applied to a database newer than 4.6.0.
39 <prerequisite type = "query"
40 name = "Checking for mobile-enabled schemas" >
41 <query>SELECT NOT EXISTS(SELECT 1 FROM pg_namespace WHERE nspname = 'xm');</query>
42 <message>This package may not be applied to a mobile-enabled database. Please see your system administrator or contact xTuple.
46 <script file="postbooks_upgrade.sql" />
47 <script file="inventory_upgrade.sql" />
48 <script file="manufacturing_upgrade.sql" />