Upgrading Achievo
=================

Read this first
---------------
Depite our efforts to keep this UPGRADE file as accurate as possible, there
might be situations in which the described procedure does not work.
In this case send an email to ivo@achievo.org or to the mailinglist
(achievo@achievo.org) and we will try to help you out.

IMPORTANT
---------
Upgrading is never without risk. ALWAYS BACKUP YOUR ACHIEVO DATABASE before
attempting to upgrade. A good way to do the upgrade is to copy the entire 
database. For example, if your database is achievo_0_6, and you want to 
upgrade to Achievo 0.8, then copy the database to achievo_0_8. Then proceed
with the instructions below.

Support
-------
Upgrading is not always easy, especially if you need to upgrade to a version
that is significantly newer than your current version. Ibuildings.nl can help
with the conversion. For information about this kind of support, see:
http://www.ibuildings.nl/en/achievo/sponsor


General upgrade instructions
============================

These are the general upgrade instructions. Sometimes, additional information
is provided for upgrading between certain versions. You will find this 
additional information at the end of this document.

Upgrading the software usually consists of replacing the Achievo sourcecode 
with a newer version. It is usually possible to use the config file from your
current Achievo installation, however, you might miss some config options that
were added in a newer release. Therefor it is best to use the new configfile and
just change the settings again.

In the upgrade/ directory, you will find database patches and upgrade scripts.
In general, you have to run these patches in the correct order, to convert 
your existing Achievo database to a database that is compatible with the
Achievo version you are currently installing. Pay attention to the file
extension of the patch. If it is '.sql', you can apply the patch using a 
databaseclient, for example like this:

$ cd achievo/upgrade
$ mysql -u root --password=secret achievo_0_x < convert-0.x-to-0.y.sql

If the file extension of the patch is '.php' however, you must execute the 
script by requesting it with your browser. For example, browse to: 
http://achievo-server/upgrade/convert-0.x-to-0.y.php
and follow the instructions.

Make sure you apply all patches in the correct order. For example, if you need 
to upgrade from Achievo 0.4 to Achievo 0.8, first do achievo-0.4-to-0.6.php
and then do achievo-0.6-to-0.8.sql.

Additional upgrade instructions
===============================

Upgrading from version 0.6.x -> 0.8
-----------------------------------
As of version 0.7 Achievo requires PHP4. PHP3 is not supported anymore!

If you were/are running the 0.6.x version of Achievo in a PHP3 only
environment you have to update your PHP version to PHP4 (we recommend
the latest version) first.


Upgrading from version 0.4.x -> 0.6
-----------------------------------
Note: the upgrade procedure does not affect your old database, so
it's safe to try the conversion.

1. First install Achievo 0.6 to a new directory (leave your existing 
   Achievo installation in place), using the achievo_mysql.sql 
   file, as described in the INSTALL file. When creating the database,
   make sure you create a new one, don't use your existing database.
   For example: if your current Achievo database is called 'achievo',
   create a new database that you call 'achievo_0_6'.
   
2. Set an administrator password by editing the config.inc.php file and
   changing the $config_administratorpassword setting.
    
3. Edit the file convert.php and change the settings in the script.
   
4. Point your browser to the convert.php script. 
   For example: http://myserver/achievo_0_8/upgrade/convert-0.4-to-0.6.php
   
5. The way we handle user passwords has changed in Achievo 0.6. Since there
   is no way to decode the existing passwords, we can't convert the existing
   passwords. If you have not set a default password for users in the 
   convert.php script, you must now login to your new Achievo installation,
   and use 'Employee Administration' to set a password for every user. 
   If you set a default password, users can login using this default password
   and change their own password.
 
6. Finally, log into Achievo, go to the 'Security Profiles' section and edit 
   the 'Default Group'. You have to grant permissions to this profile, since
   every converted user is put in this default profile.
   

