Here is what to do (Unix style, log in to server first):
Backup your 0.6.4pl1 directory!!!
cd /one/folder/above/moregroupware
cp -R moregroupware moregroupware.bak
Backup your database!!!
mysqldump --add-drop-table -a -u [user] -p [dbname] > ~/mgw064pl1.sql
Get the new release from sourceforge.net.
Unpack the files from the archive, remove the old stuff before. You can safely ignore errors on the template_c folders.
cd /one/folder/above/moregroupware
rm -r moregroupware/*
tar xzf moregroupware_0_6_5.tar.gz
Drop and recreate the database (or delete all tables in it).
mysql -u [user] -p -e "DROP DATABASE [dbname]"
mysql -u [user] -p -e "CREATE DATABASE [dbname]"
Go through the usual setup process now. We will restore your data later.
Again drop and recreate the database (or delete all tables in it).
mysql -u [user] -p -e "DROP DATABASE [dbname]"
mysql -u [user] -p -e "CREATE DATABASE [dbname]"
Now let's restore your old data in the database. Use the dump created in step 2 to restore the data.
mysql -u [user] -p [dbname] < ~/mgw064pl1.sql
You need to adjust the database now. The SQL that is shown below needs to be inserted into the database.
mysql -u [user] -p [dbname] < mgw064pl1-mgw065.sql
Here is the SQL mentioned above:
ALTER TABLE mgw_contacts CHANGE COLUMN publicKey publicKey TEXT; # was CHARACTER VARYING(150) default NULL ALTER TABLE mgw_contacts_history CHANGE COLUMN contact_company contact_company INTEGER NOT NULL default '0'; # was CHARACTER VARYING(255) NOT NULL default '' ALTER TABLE mgw_forum_threads CHANGE COLUMN thread_smiley thread_smiley CHARACTER VARYING(50) NOT NULL default ''; # was CHARACTER VARYING(15) NOT NULL default '' ALTER TABLE mgw_headline ADD COLUMN type INTEGER NOT NULL default '0'; ALTER TABLE mgw_projects ADD COLUMN owner INTEGER NOT NULL default '0'; DROP TABLE mgw_translations;
Now log in and verify everything works as expected (or at least as good as before...).
If all is up and running, you can safely delete the backup files and the SQL dump created in steps 1 and 2.
If you run into trouble, you can revert back to the old release by removing the new moregroupware directory, moving back the backup dir and just piping the backup SQL into the database:
rm -ri moregroupware
mv -i moregroupware.bak moregroupware
mysql -u [user] -p -e "DROP DATABASE [dbname]"
mysql -u [user] -p -e "CREATE DATABASE [dbname]"
mysql -u [user] -p [dbname] < mgw064pl1.sql