Upgrading from v3.0x to v3.0.1
------------------------------

The following document outlines the steps necessary to upgrade 
from a 3.0x version of Sugar to the 3.0.1 release. Only Sugar 
3.0x releases can be directly upgraded to Sugar 3.0.1.  If you 
desire to upgrade from a previous release, you must first upgrade 
to 3.0x.

IMPORTANT! Before beginning the upgrade process, it is imperative 
to perform a backup of the Sugar directory structure and the database.

The upgrade wizard in 3.0.1 is the recommended way to upgrade to Sugar 3.0.1.
To upgrade using this method, please follow the "Guided Upgrade"
instructions below. The upgrade wizard itself, all SQL commands etc are all
bundled in the Sugar 3.0.1 distribution package.


Pre-Upgrade
-----------
- Backup your current Sugar web directory and the Sugar database.  
  Customizations made to your 3.0x system may be compromised if the 
  upgrade steps are not followed exactly and you may need to restore 
  files from your backup.
- Extract the Sugar 3.0.1 zip file (not inside your current 3.0x Sugar 
  directory)


Guided Upgrade
--------------
- Copy the upgrade directory from the Sugar 3.0.1 directory to your 
  existing Sugar 3.0x directory.
- Make sure the file permissions of the Sugar 3.0x and Sugar 3.0.1 
  directories are readable and writable by your web server process.
- Change your current Sugar 3.0x config.php to be writable (it 
  will be upgraded).
- Point your web browser to: http://HOST/SUGAR30/upgrade/index.php
- You will now be in the Guided Upgrade Wizard.  Follow the directions 
  provided in the Guided Upgrade Wizard. Check the output of each step 
  for errors before proceeding to the next step.  
	- If you encounter errors, you will need to switch to the 
	  Manual Upgrade process outlined below. 
- Proceed to the Post-Upgrade section below.


Manual Upgrade
--------------
- Identify any .html files that have been customized.
- Copy Sugar 3.0.1 files to the existing 3.0x directory excluding any 
  .html files identified in the previous step.
- Ensure that the Sugar database account has been granted the following 
  privileges: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, INDEX
- Run upgrade/3.0x_to_3.0.1.sql
- Remove the cache/dynamic_fields directory from your upgraded Sugar directory.
- Upgrade your config.php file by logging in to Sugar as an admin, going 
  to the Admin link in the upper right, then the "Upgrade" link in the 
  System section, and clicking the "Upgrade config file" link.
- Proceed to the Post-Upgrade section below.


Post-Upgrade
------------
- If you skipped copying any .html files, or if you used the "Guided 
  Upgrade" and received messages about files not being copied, you will 
  need to decide whether to use the shipped versions or integrate any 
  customizations with the shipped versions.  The "Guided Setup" will 
  write the names of the files that were not copied to a file named 
  "skipped_files.txt" in the upgrade directory
- After the upgrade is complete go to the Admin screen, Configure Tabs,
  and move all of the new modules to be globally accessible.
