IMPORTANT: This procedure has only been tested against a clean installation of v1.5.3. It is strongly recommend this process be undertaken on a test server with mirrored data rather than on a live production system and it is likely there will be points of difference in just about every system attempting to upgrade. Absolutely no guarantee is given. Please share your experience to help improve this document.
NOTE: You will need to have shell-access for this procedure.
For major changes such as upgrades, it is a good idea to schedule a block of time when member usage will be at a minimum and when there will be no need to run critical functions for a while. That way, if something goes terribly wrong, you will have time to return your system to a stable configuration.
Read through the entire upgrade process before beginning and be certain you know how to get back to your original setup – either by restoring a backup or by undoing the upgrade process itself. If you are not certain, find someone more experienced to help.
The procedure you are about to perform will automatically modify many of your files and if it "goes bad" it can leave you with a mess. Be sure you have a working backup of your website and database contents. Many web hosting companies provide this service.
Download the v1.5.3 to v1.5.4 patch and save it to your web server.
Open a shell account to your web server and change to the directory immediately above DOCUMENT_ROOT.
IMPORTANT: The patch assumes default configuration with a DOCUMENT_ROOT called
public_html and all local food coop files in public_html/shop/. If that is not true for your setup, you
must move the files – or copies of the files – into that configuration prior to running the patch.
Execute the following command to apply the patch to your system:
patch -Np1 < patchfile
where patchfile is the path/name to the patch file you saved in step 1.
Running the patch command will output a list of files as they are patched. Ideally, most of them will be silently patched
with a message like
patching file public_html/shop/producers/template.php
but occasionally – particularly with the .htaccess files – it will complain, which is normal. If
you are asked for some kind of confirmation about whether/how to patch individual files, it is probably a sign that the patch
is going poorly and should be aborted. There are too many possibilities to discuss in detail here.
Database changes will be reserved for the next major upgrade to 1.6.x. There are no changes to the database structure required for moving from v1.5.3 to v1.5.4. However, some configurational information may need to be added to the existing database.
If you intend to use the per-order accounting feature to allow charging a fixed amount on each order for particular membership types, you will need to add a row much like the following to create the proper transaction_type. The values for ttype_name and ttype_description can be changed to suit your specific application. The value for ttype_parent should be 20 if this will be a regular "shopping" transaction or 40 if it is to be a "membership" transaction.
INSERT INTO
transactions_types
(
ttype_id,
ttype_parent,
ttype_name,
ttype_creditdebit,
ttype_taxed,
ttype_desc,
ttype_status,
ttype_whereshow,
ttype_value
)
VALUES
(
64,
20,
'Visitor ordering fee',
'credit',
0,
'per-order fee for visitors',
1,
'customer',
'0.00'
)
Additionally, if the value is not already set (and it was abscent from earlier versions of the v1.5.x schema), you should add the following row to your database in order to use the "80% Organic" production type designation.
INSERT INTO
production_types
(
prodtype_id,
prodtype,
proddesc
)
VALUES
(
3,
'80% Organic',
'Product contains at least 80% organic ingredients'
)
No manual file modifications are required other than to carry over any local customizations that have been made.