Upgrading from 0.6.7 to 0.6.8
Prev | Appendix B. Manually upgrading moregroupware | Next

## Upgrading from 0.6.7 to 0.6.8

| Warning
This release does not fix the security issues that have been published! It is an interim release made available for testing thw new calendar and some bugfixes. Read the chapter on securing your setup, whether you upgrade or not!

Here is what to do (Unix style, log in to server first):

1. Backup your 0.6.7 directory!!!

   `cd /one/folder/above/moregroupware`

   `cp -R moregroupware moregroupware.bak`

2. Backup your database!!!

   `mysqldump --add-drop-table -a -u [user] -p [dbname] > ~/mgw067.sql`

3. Get the new release from sourceforge.net.

4. Unpack the files from the archive.

   `cd /one/folder/above/moregroupware`

   `tar xzf moregroupware_0_6_8.tar.gz`

5. You need to adjust the database now. The SQL that is shown below needs to be inserted into the database.

   | Important
   There will be errors, so redirect the output somewhere you can easily read it! You will need to fix some things manually (e.g. duplicate keys, remove the old entry in such cases, and similar things)!

   `mysql -u [user] -p [dbname] < mgw067-mgw068.sql`

   Here is the SQL mentioned above:

       ALTER TABLE mgw_files ADD COLUMN partno int(11) default NULL;
       ALTER TABLE mgw_files ADD COLUMN msg_id int(11) default NULL;

       ALTER TABLE mgw_projects ADD COLUMN targetdate date default NULL;
       ALTER TABLE mgw_projects ADD COLUMN completed char(1) default '0';

       ALTER TABLE mgw_webmail_links ADD COLUMN account int(11) NOT NULL default '0';
       ALTER TABLE mgw_webmail_sidebar ADD COLUMN account int(11) NOT NULL default '0';
       ALTER TABLE mgw_webmail_sidebar ADD COLUMN mboxname varchar(255) NOT NULL default '';

       CREATE TABLE mgw_calendar2_ics (
         dstart varchar(255) NOT NULL default '',
         dend varchar(255) NOT NULL default '',
         dnow varchar(255) NOT NULL default '',
         dsummary varchar(255) NOT NULL default '',
         dlocation varchar(255) NOT NULL default '',
         ddesc text,
         dclass varchar(255) NOT NULL default '',
         drep_freq varchar(255) NOT NULL default '',
         drep_until varchar(255) NOT NULL default '',
         drep_count int(11) NOT NULL default '0',
         drep_interval int(11) NOT NULL default '0',
         drep_days varchar(255) NOT NULL default '',
         drep_exdate text,
         dcategories text,
         dcalendar varchar(255) NOT NULL default '',
         c_duser_id int(11) NOT NULL default '0',
         duser_id int(11) NOT NULL default '0',
         id int(11) NOT NULL default '0',
         PRIMARY KEY  (id)
       ) TYPE=MyISAM;

       CREATE TABLE mgw_projects_comments (
         comment_id int(11) NOT NULL default '0',
         task_id int(11) NOT NULL default '0',
         owner int(11) default NULL,
         date timestamp(14) NOT NULL,
         comment text,
         PRIMARY KEY  (comment_id)
       ) TYPE=MyISAM;

       CREATE TABLE mgw_projects_tasks (
         task_id int(11) NOT NULL default '0',
         project_id int(11) NOT NULL default '1',
         parent_id int(11) NOT NULL default '0',
         title text,
         hours decimal(4,2) NOT NULL default '1.00',
         enddate date default NULL,
         description text,
         status char(1) default NULL,
         assignee int(11) NOT NULL default '1',
         billable char(1) NOT NULL default '0',
         comments char(1) NOT NULL default '0',
         PRIMARY KEY  (task_id)
       ) TYPE=MyISAM;

6. Now log in and verify everything works as expected (or at least as good as before...) after going to the admin module and running the sequence check in the system tools area. This is an important step and could solve a lot of problems before they appear!

7. 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] < mgw067.sql`

Prev | Up | Next
Upgrading from 0.6.6 to 0.6.7 | Home | Upgrading from 0.6.8 to 0.6.9