UPGRADING
=========

If you decide to upgrade to a later version of 'Attachments', please see 
the section on upgrading in the help page in the administrative back end.
Look under the "Component" menu item, select "Article Attachments" and then 
click on the Help button (it looks like a lifesaver ring).  Also see the
following additional instructions:

* Before upgrading, it is prudent to backup your entire Joomla! MySQL
  database and the attachments upload directory!  See some notes on
  backing up the MySQL table for the attachments at the end of this 
  file.

UPGRADING FROM 1.3.3 to 1.3.4
=============================

* Download the file attachments-upgrade-1.3.3-to-1.3.4.zip 
  and unzip it in the root folder of your Joomla! installation.
  DO NOT USE THE JOOMLA! INSTALLER!  You will need some type of 
  shell access to do this unless your internet service provider 
  gives you tools to do such unzipping.
  
  Do not do any of the following steps.  Please let me know if
  you have any difficulties with this upgrade procedure.
  

NORMAL UPGRADING
================

1. If you do not want to keep any existing attachments, go to the 
   Attachments manager in the administrative back end and delete 
   all attachments.
   
   If you wish to retain your existing attachments, follow one of the
   procedures outlined below in the section "RETAINING ATTACHMENTS"
   before doing step 2.

2. Take note of your parameter settings.  When you reinstall the
   component, the previous settings will be lost and you will
   set the parameter settings again.

3. Uninstall and reinstall all four Attachments components and plugins.

4. Set your parameter settings again.


RETAINING ATTACHMENTS
=====================

* Upgrading from 1.2.3 or earlier to a later version.

  To retain your existing attachments, edit the file:

    administrator/components/com_attachments/uninstall.mysql.sql

  Place a # at the beginning of the line to disable deleting the 
  attachments table.
  
* Upgrading from version 1.3 or later to a later version.

  - Go to the Attachments manager in the administrative back end.
  - Click on the "Admin" item on the right end of the toolbar.
  - Click on the link "Disable uninstallation of MySQL database table"
    (This edits the file uninstall scripts to prevent the removal of
     the Attachments MySQL database table.)
  - Proceed with the upgrade process described above


BACKING UP ATTACHMENTS
======================

To back up the attachments MySQL table (eg, jos_attachments) using 
phpMyAdmin:  Select the attachments table (usually jos_attachments), 
and do EXPORT.  Do not export the table (structure), only export 
the attachments table data using 'Complete' inserts (but not 
'Extended' inserts).  This simplifies reinstallation of the 
attachments data.  Save the resulting SQL code to a file.   The 
data about the attachments can be restored using a MySQL import 
(you should empty the jos_attachments table before doing the import).  
Note that saving the SQL saves the data about the attachments but 
not the files themselves.  If you wish to back up the attachment 
files, you should back up the 'attachments' directory.
