<?xml version="1.0" encoding="iso-8859-1"?>
<appendix id="appendix_upgrade">
  <title>Manually upgrading moregroupware</title>
  
  <para>This appendix contains the instructions for manually upgrading
    moregroupware, as they have been posted to the mailing lists.
  </para>
  
  <important>
    <para>If you need to upgrade from e.g. 0.6.4 to 0.6.6, you
      need to perform the upgrade in two steps, from 0.6.4 to 0.6.5 and
      finally to 0.6.6. This is true for all versions!
    </para>
  </important>
  
  <warning>
    <para>You should only attempt an upgrade if you still feel
      comfortable after(!) reading the instructions. You need some knowledge
      of what you are doing. It worked for the author, but no warranty is
      given whatsoever!
    </para>
  </warning>
  
  <section id='appendix_upgrade_063'> 
    <title>Upgrading from 0.6.2 to 0.6.3</title> 
    
    <para>Here is what to do (Unix style, log in to server first):</para>
    
    <orderedlist>
      <listitem>
        <para>Backup your 0.6.2 directory, just to make sure!</para>
        <para>
          <userinput>cp -R moregroupware moregroupware.bak</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Backup your database, just to make sure!</para>
        <para>
          <userinput>mysqldump --add-drop-table -a -u [user] -p [dbname] &gt; mgw062.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Get the new release.</para>
        <para>
          <userinput>wget http://prdownloads.sourceforge.net/moregroupware/moregroupware_0_6_3.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Unpack the files from the archive, overwriting the old stuff.</para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>tar xzf moregroupware_0_6_3.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>You need to adjust the database now. The SQL that is
          shown below needs to be inserted into the database.
        </para>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; mgw062-mgw063.sql</userinput>
        </para>
        
        <para>Here is the SQL mentioned above:</para>
        
        <programlisting>
          ALTER TABLE mgw_todo ADD COLUMN priority char(1) default '3';
          INSERT INTO mgw_configtags VALUES (55,'show_company_id','1','1 if company id is to be shown, 0 if not','0','0','int','','');
          INSERT INTO mgw_configtags VALUES (56,'todo_orderby','3','default order of todos','0','0','str','','');
          INSERT INTO mgw_configtags VALUES (57,'todo_order_dir','3','order asc or desc','0','0','str','','');
          INSERT INTO mgw_configtags VALUES (58,'todo_merged','3','showin todos merged','0','0','int','','')
        </programlisting>
        
      </listitem>
      
      <listitem>
        <para>Now log in and verify everything works as expected (or
          at least as good as before...).
        </para>
      </listitem>
      
      <listitem>
        <para>If all is up and running, you can safely delete the
          files backup and the SQL dump created in steps 1 and
          2.
        </para>
      </listitem>
    </orderedlist>
    
    <para>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:
    </para>
    
    <para>
      <userinput>rm -ri moregroupware</userinput>
    </para>
    <para>
      <userinput>mv -i moregroupware.bak moregroupware</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p [dbname] &lt; mgw062.sql</userinput>
    </para>
    
  </section>
  
  <section id='appendix_upgrade_064'> 
    <title>Upgrading from 0.6.3 to 0.6.4(pl1)</title> 
    
    <para>What follows are instructions to update a moregroupware release
      0.6.3 to the new 0.6.4pl1. The same procedure works for updating to
      0.6.4, but this release is not at all recommended for use!
    </para>
    
    <para>If you have 0.6.4 already running, an update to 0.6.4pl1 just
      consists of unpacking the files over the old ones. Database changes
      were minimal and dealt mostly with improving default rights.
    </para>
    
    <warning>
      <para>You will loose your settings and rights adjustments,
        sorry!  There were some substantial changes to the database structure
        this time.
      </para>
    </warning>
    
    <note>
      <para>After the upgrade you will get errors like
        <computeroutput>Unknown column 'c.configtagid'</computeroutput>. These
        are not caused by the update, but are bugs in some parts of the
        code. You should upgrade to a newer version.
      </para>
    </note>
    
    <para>Here is what to do (Unix style, log in to server first):</para>
    
    <orderedlist>
      <listitem>
        <para>Backup your 0.6.3 directory!!!</para>
        <para>
          <userinput>cp -R moregroupware moregroupware.bak</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Backup your database!!!</para>
        <para>
          <userinput>mysqldump --add-drop-table -a -u [user] -p [dbname] &gt; mgw063.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Get the new release from sourceforge.net.</para>
      </listitem>
      
      <listitem>
        <para>Unpack the files from the archive, remove the old
          stuff before. You can safely ignore errors on the template_c
          folders.
        </para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>rm -r moregroupware/*</userinput>
        </para>
        <para>
          <userinput>tar xzf moregroupware_0_6_4pl1.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Clean the database now, using the SQL shown below.</para>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; clean.sql</userinput>
        </para>
        
        <para>Here is the SQL mentioned above:</para>
        
        <programlisting>
          DROP TABLE IF EXISTS mgw_calendar;
          DROP TABLE IF EXISTS mgw_calendar_tmp;
          DROP TABLE IF EXISTS mgw_companies;
          DROP TABLE IF EXISTS mgw_config;
          DROP TABLE IF EXISTS mgw_configtags;
          DROP TABLE IF EXISTS mgw_contacts;
          DROP TABLE IF EXISTS mgw_contacts_groups;
          DROP TABLE IF EXISTS mgw_contacts_history;
          DROP TABLE IF EXISTS mgw_countries;
          DROP TABLE IF EXISTS mgw_forum_forums;
          DROP TABLE IF EXISTS mgw_forum_groups;
          DROP TABLE IF EXISTS mgw_forum_moderators;
          DROP TABLE IF EXISTS mgw_forum_threads;
          DROP TABLE IF EXISTS mgw_forum_users;
          DROP TABLE IF EXISTS mgw_groups;
          DROP TABLE IF EXISTS mgw_groups_members;
          DROP TABLE IF EXISTS mgw_headline;
          DROP TABLE IF EXISTS mgw_headline_channels;
          DROP TABLE IF EXISTS mgw_jobhours_occupation;
          DROP TABLE IF EXISTS mgw_jobhours_prices;
          DROP TABLE IF EXISTS mgw_jobhours_time;
          DROP TABLE IF EXISTS mgw_languages;
          DROP TABLE IF EXISTS mgw_modules;
          DROP TABLE IF EXISTS mgw_news;
          DROP TABLE IF EXISTS mgw_news_channels;
          DROP TABLE IF EXISTS mgw_partprog;
          DROP TABLE IF EXISTS mgw_projects;
          DROP TABLE IF EXISTS mgw_rights;
          DROP TABLE IF EXISTS mgw_todo;
          DROP TABLE IF EXISTS mgw_translations;
          DROP TABLE IF EXISTS mgw_users;
        </programlisting>
      </listitem>
      
      <listitem>
        <para>Go through the usual setup process now. We will
          restore your data later.
        </para>
      </listitem>
      
      <listitem>
        <para>Now let's restore your old data in the database. Use
          the dump created in step 2 to restore the data.
        </para>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; mgw063.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>You need to adjust the database now. The SQL that is
          shown below needs to be inserted into the database.
        </para>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; mgw063-mgw064.sql</userinput>
        </para>
        
        <para>Here is the SQL mentioned above:</para>
        
        <programlisting>
          ## mysqldiff 0.29
          ##
          ## run on Tue May 28 18:52:52 2002
          ##
          ## ---   db: mgw063
          ## +++   db: mgw064
          
          ALTER TABLE mgw_companies ADD COLUMN state varchar(50) default NULL;
          
          DELETE FROM mgw_config;
          ALTER TABLE mgw_config DROP COLUMN configtagid; # was int(11) NOT NULL default '0'
          ALTER TABLE mgw_config ADD COLUMN configtagname varchar(100) NOT NULL default '0' AFTER userid;
          ALTER TABLE mgw_config DROP PRIMARY KEY; # was (userid,configtagid,serialnr)
          ALTER TABLE mgw_config ADD PRIMARY KEY (userid,configtagname,serialnr);
          
          DELETE FROM mgw_configtags;
          ALTER TABLE mgw_configtags DROP COLUMN moduleid; # was int(11) NOT NULL default '0'
          ALTER TABLE mgw_configtags DROP COLUMN id; # was int(11) NOT NULL default '0'
          ALTER TABLE mgw_configtags ADD COLUMN modulename varchar(100) NOT NULL default '0' AFTER configtagname;
          ALTER TABLE mgw_configtags DROP PRIMARY KEY; # was (id,configtagname)
          ALTER TABLE mgw_configtags ADD PRIMARY KEY (configtagname);
          
          INSERT INTO mgw_config VALUES (0,'iconmode',1,'',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'css_skin_theme',1,'Morelogs_Silver.css',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'language',1,'en',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'iconid',1,'',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'set_timefmt',1,'24h',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'set_hourminsep',1,':',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'set_datefmt',1,'ddmmyy',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'set_dmysep',1,'/',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'datefmt',1,'d/m/y',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'timefmt',1,'H:i',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'currency',1,'eur',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'calendar_viewfrom',1,'',8,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'calendar_viewto',1,'',17,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'calendar_remindermail',1,'',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'calendar_interval',1,'',30,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'holiday_system',1,'en',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'calendar_defaultview',1,'index.php',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'quicksearchmethod',1,'mgw_contacts.firstname',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'quicksearchmethod',2,'mgw_contacts.lastname',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'quicksearchmethod',3,'mgw_companies.name1',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'contacts_per_page',1,'',10,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'birthdayremindoffset',1,'-1',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'birthdayremindmethod',1,'EMAIL',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'birthdayremind_on_off',1,'',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'favourite_countries',1,'DEU',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'favourite_countries',2,'FRA',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'favourite_countries',3,'CZE',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'favourite_countries',4,'GBR',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'todos_per_page',1,'',10,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_pop3user',1,'pop3user',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_pop3pw',1,'pop3password',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_apop',1,'',1,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_pop3host',1,'pop3hostname',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_smtphost',1,'smtphostname',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_sort',1,'Arrival Time',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_viewheader',1,'',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_maxattach',1,'',3,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_replyto',1,'replyto@adress.com',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_emailsperpage',1,'',10,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_fromname',1,'From Name',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'wm_signature',1,'',0,'Some default Signature','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forum_posts_per_page',1,'',5,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forum_replies_per_page',1,'',5,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forum_pages',1,'',5,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forum_threads_viewtime',1,'',30,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forum_animatedgifs',1,'',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forum_signature',1,'',0,'This is the default
          +Signature','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forum_mylogo',1,'',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_withmoderator',1,'',1,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_withsignature',1,'',1,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_withlogos',1,'',1,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_editownthreads',1,'',1,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_withemailnotify',1,'',1,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_mailsubject',1,'Default email subject',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_mailfromname',1,'Moregroupware_System',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_mailfromadress',1,'default@someadress.com',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_footeremailnotice',1,'some other email adress could be here',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'forumgen_footerhpnotice',1,'some homepage informations could be here',0,'','',1,00000000000000);
          INSERT INTO mgw_config VALUES (0,'headline_proxy',1,'',0,'','',1,00000000000000);
          
          INSERT INTO mgw_configtags VALUES ('iconmode','*','true if links should be icons, false if links should be text',1,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('css_skin_theme','*','which CSS file to use / actual theme file',1,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('language','*','which language to use (language id)',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('iconid','*','Icon Style (for different icon types)',0,0,'int',1,20011111000000);
          INSERT INTO mgw_configtags VALUES ('set_timefmt','*','12h or 24h time format',0,0,'str',1,20011227235843);
          INSERT INTO mgw_configtags VALUES ('set_hourminsep','*','seperator in time displays between hour and minute',0,0,'str',1,20011227235832);
          INSERT INTO mgw_configtags VALUES ('set_datefmt','*','dateformat (settings notation)',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('set_dmysep','*','day-month-year seperator',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('datefmt','*','dateformat PHP date notation',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('timefmt','*','timeformat based on PHP date()',0,0,'str',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('currency','*','user currency',0,0,'str',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('calendar_viewfrom','calendar','daytime from where to display the appointments',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('calendar_viewto','calendar','daytime until appointments should appear',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('calendar_remindermail','calendar','send email reminds in calendar',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('calendar_interval','calendar','time intervalls for calendar in minutes',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('holiday_system','calendar','for which country to evaluate holidays',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('calendar_defaultview','calendar','default calendar view',0,0,'str',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('quicksearchmethod','contact','WHat fields to look for when quick searching',1,1,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('contacts_per_page','contact','How many contacts to display on one page',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('birthdayremindoffset','contact','Days before or after birthday to remind (-1 = one day before, +1 one day after, 0 = same day ...)',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('birthdayremindmethod','contact','How the reminder should remind',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('birthdayremind_on_off','contact','remind on / off',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('favourite_countries','contact','list of top 5 favourite countries',0,1,'str',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('show_company_id','contact','1 if company id is to be shown, 0 if not',0,0,'int',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('todos_per_page','todo','how many contacts to display before paging occurs',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('todo_orderby','todo','default order of todos',0,0,'str',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('todo_order_dir','todo','order asc or desc',0,0,'str',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('todo_merged','todo','showin todos merged',0,0,'int',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('todo_emaildelegade','todo','mailing delegaded todos',0,0,'int',0,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_pop3user','wmail','POP3 User/Account',0,1,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_pop3pw','wmail','POP3 Password',0,1,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_apop','wmail','Authentication via APOP',0,1,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_pop3host','wmail','hostname of POP3 Server',0,1,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_smtphost','wmail','hostname of SMTP Server',0,1,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_sort','wmail','Sorting of maillist',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_viewheader','wmail','View Emailheader',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_maxattach','wmail','max attachments',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_replyto','wmail','Reply-To Adress',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_emailsperpage','wmail','how many email per page',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_fromname','wmail','Email From Name',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('wm_signature','wmail','Signature',0,1,'txt',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forum_posts_per_page','forum','nr of posts per page in forum',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forum_replies_per_page','forum','how many replies per page in forum',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forum_pages','forum','nr of forum pages',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forum_threads_viewtime','forum','how many days a thread should be visible',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forum_animatedgifs','forum','use animated gifs in forum',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forum_signature','forum','your signature',0,0,'txt',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forum_mylogo','forum','your personal logo',0,0,'blob',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_withmoderator','forum','with moderators',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_withsignature','forum','with signatures',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_withlogos','forum','with Logos',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_editownthreads','forum','if users can edit their own threads',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_withemailnotify','forum','with email remind on new posts',0,0,'int',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_mailsubject','forum','subject of email',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_mailfromname','forum','name of mail sender',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_mailfromadress','forum','emailadress of sender',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_footeremailnotice','forum','footer information regarding email',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('forumgen_footerhpnotice','forum','footer information regarding homepage',0,0,'str',1,00000000000000);
          INSERT INTO mgw_configtags VALUES ('headline_proxy','headline','proxy setting for headline',0,0,'str',0,00000000000000);
          
          ALTER TABLE mgw_contacts ADD COLUMN priv_state varchar(50) default NULL;
          
          ALTER TABLE mgw_modules DROP PRIMARY KEY; # was (id)
          ALTER TABLE mgw_modules DROP COLUMN id; # was int(5) NOT NULL default '0'
          ALTER TABLE mgw_modules DROP INDEX modulename; # was UNIQUE (modulename)
          ALTER TABLE mgw_modules ADD PRIMARY KEY (modulename);
          
          DELETE FROM mgw_rights;
          
          ALTER TABLE mgw_rights DROP PRIMARY KEY; # was (moduleid,user_group_id)
          ALTER TABLE mgw_rights DROP COLUMN moduleid; # was int(5) NOT NULL default '0'
          ALTER TABLE mgw_rights ADD COLUMN modulename varchar(50) NOT NULL default '0' FIRST;
          ALTER TABLE mgw_rights ADD PRIMARY KEY (modulename,user_group_id);
          
          INSERT INTO mgw_rights VALUES ('forum',50002,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('forum',50003,1,1,1,1,1,1,6,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('admin',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('calendar',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('calendar',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('contact',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('contact',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('overview',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('overview',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('projects',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('projects',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('settings',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('settings',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('todo',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('todo',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('wmail',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('wmail',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('forum',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('forum',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('headline',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('headline',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('news',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('news',50001,1,1,1,0,1,0,3,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('partprog',50000,1,1,1,1,1,1,9,1,00000000000000);
          INSERT INTO mgw_rights VALUES ('partprog',50001,1,1,1,0,1,0,3,1,00000000000000);
          
          ALTER TABLE mgw_todo CHANGE COLUMN fromuserid fromuserid int(11) default NULL; # was int(5) default NULL
          ALTER TABLE mgw_todo CHANGE COLUMN userid userid int(11) NOT NULL default '0'; # was int(7) NOT NULL default '0'
          ALTER TABLE mgw_todo CHANGE COLUMN projectid projectid tinyint(11) NOT NULL default '0'; # was tinyint(4) NOT NULL default '0'
          ALTER TABLE mgw_todo ADD COLUMN endtype char(1) default '1';
        </programlisting>
      </listitem>
      
      <listitem>
        <para>Now log in and verify everything works as expected (or
          at least as good as before...).
        </para>
      </listitem>
      
      <listitem>
        <para>If all is up and running, you can safely delete the
          backup files and the SQL dump created in steps 1 and
          2.
        </para>
      </listitem>
      
    </orderedlist>
    
    <para>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:
    </para>
    
    <para>
      <userinput>rm -ri moregroupware</userinput>
    </para>
    <para>
      <userinput>mv -i moregroupware.bak moregroupware</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p [dbname] &lt; mgw063.sql</userinput>
    </para>
    
  </section>
  
  <section id='appendix_upgrade_065'> 
    <title>Upgrading from 0.6.4pl1 to 0.6.5</title>
    
    <para>Here is what to do (Unix style, log in to server first):</para>
    
    <orderedlist>
      <listitem>
        <para>Backup your 0.6.4pl1 directory!!!</para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>cp -R moregroupware moregroupware.bak</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Backup your database!!!</para>
        <para>
          <userinput>mysqldump --add-drop-table -a -u [user] -p [dbname] &gt; ~/mgw064pl1.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Get the new release from sourceforge.net.</para>
      </listitem>
      
      <listitem>
        <para>Unpack the files from the archive, remove the old
          stuff before. You can safely ignore errors on the template_c
          folders.
        </para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>rm -r moregroupware/*</userinput>
        </para>
        <para>
          <userinput>tar xzf moregroupware_0_6_5.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Drop and recreate the database (or delete all tables
          in it).
        </para>
        <para>
          <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
        </para>
        <para>
          <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Go through the usual setup process now. We will
          restore your data later.
        </para>
      </listitem>
      
      <listitem>
        <para>Again drop and recreate the database (or delete all
          tables in it).
        </para>
        <para>
          <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
        </para>
        <para>
          <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Now let's restore your old data in the database. Use
          the dump created in step 2 to restore the data.
        </para>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; ~/mgw064pl1.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>You need to adjust the database now. The SQL that is
          shown below needs to be inserted into the database.
        </para>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; mgw064pl1-mgw065.sql</userinput>
        </para>
        
        <para>Here is the SQL mentioned above:</para>
        
        <programlisting>
          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;
        </programlisting>
      </listitem>
      
      <listitem>
        <para>Now log in and verify everything works as expected (or
          at least as good as before...).
        </para>
      </listitem>
      
      <listitem>
        <para>If all is up and running, you can safely delete the
          backup files and the SQL dump created in steps 1 and
          2.
        </para>
      </listitem>
      
    </orderedlist>
    
    <para>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:
    </para>
    
    <para>
      <userinput>rm -ri moregroupware</userinput>
    </para>
    <para>
      <userinput>mv -i moregroupware.bak moregroupware</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p [dbname] &lt; mgw064pl1.sql</userinput>
    </para>
    
  </section>
  
  <section id='appendix_upgrade_066'> 
    <title>Upgrading from 0.6.5 to 0.6.6</title>
    
    <para>Here is what to do (Unix style, log in to server first):</para>
    
    <orderedlist>
      <listitem>
        <para>Backup your 0.6.5 directory!!!</para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>cp -R moregroupware moregroupware.bak</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Backup your database!!!</para>
        <para>
          <userinput>mysqldump --add-drop-table -a -u [user] -p [dbname] &gt; ~/mgw065.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Get the new release from sourceforge.net.</para>
      </listitem>
      
      <listitem>
        <para>Unpack the files from the archive, remove the old
          stuff before. You can safely ignore errors on the template_c
          and cache (and store) folders.
        </para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>rm -r moregroupware/*</userinput>
        </para>
        <para>
          <userinput>tar xzf moregroupware_0_6_6.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Drop and recreate the database (or delete all tables
          in it).
        </para>
        <para>
          <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
        </para>
        <para>
          <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Go through the usual setup process now. We will
          restore your data later.
        </para>
      </listitem>
      
      <listitem>
        <para>Again drop and recreate the database (or delete all
          tables in it).
        </para>
        <para>
          <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
        </para>
        <para>
          <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Now let's restore your old data in the database. Use
          the dump created in step 2 to restore the data.
        </para>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; ~/mgw065.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>You need to adjust the database now. The SQL that is
          shown below needs to be inserted into the database.
        </para>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; mgw065-mgw066.sql</userinput>
        </para>
        
        <para>Here is the SQL mentioned above:</para>
        
        <programlisting>
          ALTER TABLE mgw_calendar CHANGE COLUMN subject subject TEXT NOT NULL; # was varchar(100) NOT NULL default ''
          ALTER TABLE mgw_calendar_tmp CHANGE COLUMN subject subject TEXT NOT NULL; # was varchar(100) NOT NULL default ''
          
          INSERT INTO mgw_configtags VALUES ('overview_news','news','numer of news to show in overview',0,0,'int',1,'2002-01-01');
          INSERT INTO mgw_configtags VALUES ('def_module','*','default module to show',0,0,'str',1,'2002-01-01');
          INSERT INTO mgw_configtags VALUES ('overview_notes','notes','numer of notes to show in overview',0,0,'int',1,'2002-01-01');
          INSERT INTO mgw_configtags VALUES ('notes_orderby','notes','default order of notes',0,0,'str',1,'2002-01-01');
          INSERT INTO mgw_configtags VALUES ('notes_order_dir','notes','order asc or desc',0,0,'str',1,'2002-01-01');
          
          ALTER TABLE mgw_config DROP COLUMN value_blob; # was blob NOT NULL
          INSERT INTO mgw_config VALUES (0,'def_module',1,'overview',0,'',1,'2002-01-01');
          INSERT INTO mgw_config VALUES (0,'overview_news',1,'5',0,'',1,'2002-01-01');
          INSERT INTO mgw_config VALUES (0,'overview_notes',1,'5',0,'',1,'2002-01-01');
          UPDATE mgw_config SET value_int=1 WHERE value_str='checked';
          
          ALTER TABLE mgw_contacts_history CHANGE COLUMN contact_date contact_date timestamp(14) NOT NULL; # was datetime NOT NULL default '0000-00-00 00:00:00'
          
          ALTER TABLE mgw_headline_channels ADD COLUMN private INTEGER NOT NULL default '0';
          ALTER TABLE mgw_headline_rss ADD COLUMN private INTEGER NOT NULL default '0';
          ALTER TABLE mgw_headline_rss ADD COLUMN lu_date timestamp(14) NOT NULL;
          ALTER TABLE mgw_headline_rss ADD COLUMN lu_user INTEGER NOT NULL default '0';
          
          ALTER TABLE mgw_jobhours_time CHANGE COLUMN time time decimal(8,2) NOT NULL default '0.00'; # was decimal(4,2) NOT NULL default '0.00'
          
          ALTER TABLE mgw_notes_categories DROP INDEX name_key; # was UNIQUE (name)
          ALTER TABLE mgw_notes_categories ADD INDEX name (name);
          
          ALTER TABLE mgw_projects CHANGE COLUMN startdate startdate date default NULL; # was date NOT NULL default '0000-00-00'
          ALTER TABLE mgw_projects CHANGE COLUMN enddate enddate date default NULL; # was date NOT NULL default '0000-00-00'
          
          ALTER TABLE mgw_users ADD COLUMN lastin timestamp(14) NOT NULL;
          
          CREATE TABLE mgw_files (
          id INTEGER NOT NULL default '0',
          type CHAR(1) NOT NULL default 'f',
          resides_in INTEGER default NULL,
          owner INTEGER NOT NULL default '0',
          name varchar(50) default NULL,
          mime_type varchar(20) default NULL,
          owner_rights CHAR(1) NOT NULL default '',
          all_rights CHAR(1) NOT NULL default '',
          created timestamp(14) NOT NULL,
          modified timestamp(14) NOT NULL,
          modified_by INTEGER default NULL,
          links_to INTEGER default NULL,
          PRIMARY KEY  (id),
          UNIQUE KEY resides_in (resides_in,name)
          );
          
          CREATE TABLE mgw_files_grouprights (
          id INTEGER NOT NULL default '0',
          for_file INTEGER default NULL,
          for_group INTEGER default NULL,
          rights CHAR(1) NOT NULL default '',
          PRIMARY KEY  (id),
          UNIQUE KEY for_file (for_file,for_group)
          );
          
          CREATE TABLE mgw_outboard (
          id_username INTEGER NOT NULL default '0',
          tsout INTEGER NOT NULL default '0',
          tsin INTEGER NOT NULL default '0',
          location TEXT,
          notes TEXT,
          autoin CHAR(1) NOT NULL default '',
          statusid CHAR(2) NOT NULL default '',
          lu_user INTEGER NOT NULL default '0',
          lu_update INTEGER NOT NULL default '0',
          PRIMARY KEY  (id_username)
          );
        </programlisting>
        
        <important>
          <para>If you have been using the webmail2
            module, make sure you restore the contents of the
            <filename>modules/webmail2/store/</filename> directory. Now read the
            webmail2 update manual in
            <filename>MGW_0-65_to_0-66_Webmail_Update_manual.pdf</filename> in
            <filename>modules/webmail2/docu/</filename>! You need to drop the webmail2
            tables and restore them from your SQL backup before this will work!
          </para>
        </important>
      </listitem>
      
      <listitem>
        <para>Now log in and verify everything works as expected (or
          at least as good as before...).
        </para>
      </listitem>
      
      <listitem>
        <para>If all is up and running, you can safely delete the
          backup files and the SQL dump created in steps 1 and 2.
        </para>
      </listitem>
      
    </orderedlist>
    
    <para>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:
    </para>
    
    <para>
      <userinput>rm -ri moregroupware</userinput>
    </para>
    <para>
      <userinput>mv -i moregroupware.bak moregroupware</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p [dbname] &lt; mgw065.sql</userinput>
    </para>
    
  </section>
  
  <section id='appendix_upgrade_067'> 
    <title>Upgrading from 0.6.6 to 0.6.7</title>
    
    <para>Here is what to do (Unix style, log in to server first):</para>
    
    <orderedlist>
      <listitem>
        <para>Backup your 0.6.6 directory!!!</para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>cp -R moregroupware moregroupware.bak</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Backup your database!!!</para>
        <para>
          <userinput>mysqldump --add-drop-table -a -u [user] -p [dbname] &gt; ~/mgw066.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Get the new release from sourceforge.net.</para>
      </listitem>
      
      <listitem>
        <para>Unpack the files from the archive.
        </para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>tar xzf moregroupware_0_6_7.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>
          There are a few changes that need to be done to the <filename>config.inc.php</filename> file.
        </para>
        <para>
          <userinput>The following lines need to be added and/or changed. The first two may seem less important, but at least the version is needed for correct bug reports.</userinput>
        </para>
        <programlisting><![CDATA[
$appconf["mgw_version"] = "0.6.7 - Spring";
$appconf["mgw_releasedate"] = "200304xx";
$appconf["def_language"] = "en";

$appconf["use_ntlm_auth"]= "";
$appconf["encrypt_pwd"]= "0";

define("SETUP_RUNNING", false);
define("LANG_DEBUG", false);
]]>
        </programlisting>

      </listitem>
      
      <listitem>
        <para>You need to adjust the database now. The SQL that is
          shown below needs to be inserted into the database.
        </para>
<important><para> 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)!</para></important>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; mgw066-mgw067.sql</userinput>
        </para>
        
        <para>Here is the SQL mentioned above:</para>
        
        <programlisting><![CDATA[
ALTER TABLE mgw_contacts DROP COLUMN keyType; # was varchar(150) default NULL
ALTER TABLE mgw_contacts ADD COLUMN keytype varchar(150) default NULL;

ALTER TABLE mgw_files CHANGE COLUMN name name varchar(255) default NULL; # was varchar(50) default NULL
ALTER TABLE mgw_files CHANGE COLUMN mime_type mime_type varchar(70) default NULL; # was varchar(20) default NULL
ALTER TABLE mgw_files ADD COLUMN size int(11) NOT NULL default '0';

ALTER TABLE mgw_todo ADD COLUMN startdate timestamp(14) NOT NULL;
ALTER TABLE mgw_todo ADD COLUMN starttype char(1) default '1';

CREATE TABLE mgw_instmsg (
  id int(11) NOT NULL default '0',
  sender int(11) NOT NULL default '0',
  recipient int(11) NOT NULL default '0',
  subject varchar(255) NOT NULL default '',
  message text NOT NULL,
  status char(1) NOT NULL default 'N',
  PRIMARY KEY  (id),
  KEY mimrecidx (recipient),
  KEY statidx (status)
);

CREATE TABLE mgw_log (
  id int(11) NOT NULL default '0',
  sort int(11) NOT NULL default '0',
  session varchar(128) NOT NULL default '',
  stamp int(11) NOT NULL default '0',
  level int(11) NOT NULL default '1',
  module varchar(30) NOT NULL default 'general',
  line int(11) NOT NULL default '0',
  file varchar(255) NOT NULL default '',
  message text NOT NULL
);

CREATE TABLE mgw_notes_comments (
  id int(11) NOT NULL default '0',
  note_id int(11) NOT NULL default '0',
  comment text NOT NULL,
  lu_update timestamp(14) NOT NULL,
  lu_user int(11) NOT NULL default '0',
  PRIMARY KEY  (id)
);

CREATE TABLE mgw_notifications (
  id int(11) NOT NULL default '0',
  sender int(11) NOT NULL default '0',
  recipient int(11) NOT NULL default '0',
  message text NOT NULL,
  PRIMARY KEY  (id),
  KEY notrecidx (recipient)
);

INSERT INTO mgw_config VALUES (0,'enable_logging',1,'',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_admin',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_admin',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_admin',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_overview',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_overview',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_overview',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_settings',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_settings',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_settings',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_calendar',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_calendar',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_calendar',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_contact',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_contact',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_contact',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_files',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_files',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_files',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_forum',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_forum',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_forum',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_headline',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_headline',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_headline',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_news',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_news',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_news',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_notes',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_notes',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_notes',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_outboard',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_outboard',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_outboard',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_partprog',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_partprog',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_partprog',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_projects',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_projects',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_projects',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_todo',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_todo',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_todo',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_tts',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_tts',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_tts',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_webmail2',1,'',16,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_webmail2',2,'',8,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'log_webmail2',3,'',4,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'notify_js',1,'',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'notify_html',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'notify_mim_iframe',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'notify_mim_refresh',1,'',60,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'notify_mim_alert',1,'',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'notify_mail_from',1,'noreply@mgw.invalid',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'overview_get_modules',1,'news',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'overview_get_modules',2,'todo',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'overview_get_modules',3,'calendar',0,'',1,20020101000000);

INSERT INTO mgw_config VALUES (0,'calendar_notification',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'calendar_notification',2,'',6,'',1,20020101000000);

INSERT INTO mgw_config VALUES (0,'files_forbidden_mime',1,'application/x-msdos-program',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_deb_binary',1,'/usr/bin/dpkg',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_enscript_binary',1,'/usr/bin/enscript',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_mp3_binary',1,'/usr/bin/mp3info',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_msexcel_binary',1,'/usr/bin/xlhtml',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_mspowerpoint_binary',1,'/usr/bin/ppthtml',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_msword_binary',1,'/usr/bin/wvHtml',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_rar_binary',1,'/usr/bin/rar',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_rpm_binary',1,'/usr/bin/rpm',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_tgz_binary',1,'/bin/tar',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'mime_zip_binary',1,'/usr/bin/zipinfo',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (3,'def_module',1,'forum',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (4,'def_module',1,'forum',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forum_posts_per_page',1,'',5,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forum_replies_per_page',1,'',5,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forum_pages',1,'',5,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forum_threads_viewtime',1,'',30,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forum_animatedgifs',1,'',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forum_signature',1,'',0,'This is the default Signature',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forum_mylogo',1,'',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_withmoderator',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_withsignature',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_withlogos',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_editownthreads',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_withemailnotify',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_mailsubject',1,'Default email subject',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_mailfromname',1,'Moregroupware_System',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_mailfromadress',1,'default@someadress.com',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_footeremailnotice',1,'some other email adress could be here',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'forumgen_footerhpnotice',1,'some homepage informations could be here',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'headline_proxy',1,'',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'headline_version',1,'062',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'overview_news',1,'',5,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'overview_notes',1,'',5,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'notes_enable_comments',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'todos_per_page',1,'',10,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'todo_merged',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'todo_overview_unstarted',1,'',0,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'todo_notification',1,'',1,'',1,20020101000000);
INSERT INTO mgw_config VALUES (0,'todo_notification',2,'',6,'',1,20020101000000);

INSERT INTO mgw_configtags VALUES ('enable_logging','*','global enable logging',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_admin','*','admin module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_overview','*','overview module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_settings','*','settings module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_calendar','*','calendar module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_contact','*','contact module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_files','*','files module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_forum','*','forum module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_headline','*','headline module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_news','*','news module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_notes','*','notes module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_outboard','*','outboard module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_partprog','*','partprog module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_projects','*','projects module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_todo','*','todo module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_tts','*','tts module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('log_webmail2','*','webmail2 module logging level',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notify_js','*','enable js notification',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notify_html','*','enable html notification',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notify_mim_iframe','*','enable iframe for MIM',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notify_mim_refresh','*','MIM refresh interval',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notify_mim_alert','*','enable alert for MIM',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notify_mail_from','*','mail notification sender mail',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('overview_get_modules','overview','What modules show in overview',1,1,'str',1,20020101000000);

INSERT INTO mgw_configtags VALUES ('calendar_notification','calendar','notification for calendar',1,1,'int',1,20020101000000);

INSERT INTO mgw_configtags VALUES ('use_dialer','contact','1 if dialer is to be shown, 0 if not',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('files_forbidden_mime','*','forbidden MIME types',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_deb_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_enscript_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_mp3_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_msexcel_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_mspowerpoint_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_msword_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_rar_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_rpm_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_tgz_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_zip_enable','*','enable mime viewer',1,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_deb_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_enscript_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_mp3_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_msexcel_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_mspowerpoint_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_msword_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_rar_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_rpm_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_tgz_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('mime_zip_binary','*','mime viewer binary',1,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forum_posts_per_page','forum','nr of posts per page in forum',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forum_replies_per_page','forum','how many replies per page in forum',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forum_pages','forum','nr of forum pages',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forum_threads_viewtime','forum','how many days a thread should be visible',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forum_animatedgifs','forum','use animated gifs in forum',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forum_signature','forum','your signature',0,0,'txt',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forum_mylogo','forum','your personal logo',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_withmoderator','forum','with moderators',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_withsignature','forum','with signatures',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_withlogos','forum','with Logos',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_editownthreads','forum','if users can edit their own threads',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_withemailnotify','forum','with email remind on new posts',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_mailsubject','forum','subject of email',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_mailfromname','forum','name of mail sender',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_mailfromadress','forum','emailadress of sender',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_footeremailnotice','forum','footer information regarding email',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('forumgen_footerhpnotice','forum','footer information regarding homepage',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('headline_proxy','headline','proxy setting for headline',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('headline_version','headline','',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('overview_news','news','numer of news to show in overview',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('overview_notes','notes','numer of notes to show in overview',0,0,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notes_orderby','notes','default order of notes',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notes_order_dir','notes','order asc or desc',0,0,'str',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('notes_enable_comments','notes','allow comments on notes',0,0,'int',1,20020101000000);

INSERT INTO mgw_configtags VALUES ('todo_notification','todo','notification for delegaded todos',1,1,'int',1,20020101000000);
INSERT INTO mgw_configtags VALUES ('todo_overview_unstarted','todo','show unstarted todos in overview',0,0,'int',1,20020101000000);
]]>
        </programlisting>
        
        <important>
          <para>If you have been using the webmail2
            module, read the
            webmail2 update manual in
            <filename>MGW_0-66_to_0-67_Webmail_Update_manual.pdf</filename> in
            <filename>modules/webmail2/docu/</filename>!
          </para>
        </important>
      </listitem>
      
      <listitem>
        <para>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!
        </para>
      </listitem>
      
      <listitem>
        <para>If all is up and running, you can safely delete the
          backup files and the SQL dump created in steps 1 and 2.
        </para>
      </listitem>
      
    </orderedlist>
    
    <para>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:
    </para>
    
    <para>
      <userinput>rm -ri moregroupware</userinput>
    </para>
    <para>
      <userinput>mv -i moregroupware.bak moregroupware</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p [dbname] &lt; mgw066.sql</userinput>
    </para>
    
  </section>
  
  <section id='appendix_upgrade_068'> 
    <title>Upgrading from 0.6.7 to 0.6.8</title>

    <warning><para>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 <link linkend="setup_security">
      chapter on securing your setup</link>, whether you upgrade or not!
    </para></warning>

    <para>Here is what to do (Unix style, log in to server first):</para>
    
    <orderedlist>
      <listitem>
        <para>Backup your 0.6.7 directory!!!</para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>cp -R moregroupware moregroupware.bak</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Backup your database!!!</para>
        <para>
          <userinput>mysqldump --add-drop-table -a -u [user] -p [dbname] &gt; ~/mgw066.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Get the new release from sourceforge.net.</para>
      </listitem>
      
      <listitem>
        <para>Unpack the files from the archive.
        </para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>tar xzf moregroupware_0_6_8.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>You need to adjust the database now. The SQL that is
          shown below needs to be inserted into the database.
        </para>
<important><para> 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)!</para></important>
        <para>
          <userinput>mysql -u [user] -p [dbname] &lt; mgw067-mgw068.sql</userinput>
        </para>
        
        <para>Here is the SQL mentioned above:</para>
        
        <programlisting><![CDATA[
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;

]]>
        </programlisting>
      </listitem>
      
      <listitem>
        <para>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!
        </para>
      </listitem>
      
      <listitem>
        <para>If all is up and running, you can safely delete the
          backup files and the SQL dump created in steps 1 and 2.
        </para>
      </listitem>
      
    </orderedlist>
    
    <para>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:
    </para>
    
    <para>
      <userinput>rm -ri moregroupware</userinput>
    </para>
    <para>
      <userinput>mv -i moregroupware.bak moregroupware</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p [dbname] &lt; mgw067.sql</userinput>
    </para>
    
  </section>
  
  <section id='appendix_upgrade_069'> 
    <title>Upgrading from 0.6.8 to 0.6.9</title>

    <note><para>These instructions are also valid for upgrades from earlier
    0.6.9 CVS versions to the released version.</para></note>

    <warning><para>There have been incompatible changes to the
    projects module. If you use this module, try out this new version in a
    seperate installment to see if it (still) fits your needs. Upon
    upgrading the list of projects should be carried over (and the
    timesheets data should survive, although invisible), but please be
    careful.
    </para></warning>

    <para>Here is what to do (Unix style, log in to server first):</para>
    
    <orderedlist>
      <listitem>
        <para>Backup your 0.6.8 directory!!!</para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>cp -R moregroupware moregroupware.bak</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Backup your database!!!</para>
        <para>
          <userinput>mysqldump --add-drop-table -a -u [user] -p [dbname] &gt; ~/mgw068.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Get the new release from sourceforge.net.</para>
      </listitem>
      
      <listitem>
        <para>Move the webmail2 store folder to it's new location (you can
        safely delete the cache folders).</para>

        <para>former structure: <filename>mgw/modules/webmail2/store/0</filename></para>
        <para>new structure: <filename>mgw/data_store/webmail2/0</filename></para>
      </listitem>
      
      <listitem>
        <para>Move the files module store folder to it's new location.</para>

        <para>former structure: <filename>mgw/modules/files/store/</filename></para>
        <para>new structure: <filename>mgw/data_store/files/</filename></para>
      </listitem>
      
      <listitem>
        <para>Make the data_store folder (and the subfolders!)
        writable for the webserver.</para>
      </listitem>
      
      <listitem>
        <para>Delete everything in the more.groupware root folder
        except(!) <filename>data_store</filename>,
        <filename>config.inc.php</filename> and
        <filename>templates_c</filename>.</para>
      </listitem>
      
      <listitem>
        <para>Unpack the new files from the archive(s).
        </para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>tar xzf moregroupware_0_6_9.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Now edit <filename>config.inc.php</filename>.</para>

        <itemizedlist>
          <listitem>
            <para>Remove the line <literal>$appconf['rootpath'] = ...</literal> (if present).</para>
          </listitem>
          <listitem>
            <para>Add the forcessl parameter (if not already present):</para>
            <programlisting><![CDATA[$appconf['forcessl'] = 0;]]>
            </programlisting>
          </listitem>
          <listitem>
            <para>Add a trailing slash to rooturl (if missing):</para>
            <programlisting><![CDATA[$appconf['rooturl'] = 'http://.../mgw/';]]>
            </programlisting>
          </listitem>
          <listitem>
            <para>If present, remove the following lines:</para>
            <programlisting><![CDATA[$appconf['html_compressor'] = false;
$appconf['html_compressor_debug'] = false;]]>
            </programlisting>
          </listitem>
          <listitem>
            <para>Add the following lines (if missing):</para>
            <programlisting><![CDATA[$appconf['mgw_version_number'] = '0.6.9';
$appconf['mgw_version_name'] = 'Security';]]>
            </programlisting>
          </listitem>
          <listitem>
            <para>Change the following line:</para>
            <programlisting><![CDATA[$appconf['mgw_version'] = '0.6.8 - Nick';]]>
            </programlisting>
            <para>to</para>
            <programlisting><![CDATA[$appconf['mgw_version'] = '0.6.9 - Security / Update';]]>
            </programlisting>
          </listitem>
        </itemizedlist>

      </listitem>

      <listitem>
        <para>Open up your browser and log in to more.groupware as
        admin, the general module is updated automatically.</para>
        <para>Log in as admin again, the update for the overview module is done.</para>
        <para>Go to the module manager and install the Admin2 module.</para>
      </listitem>

      <listitem>
        <para>Now go to every installed module as admin to call the update procedure.</para>
      </listitem>

      <listitem>
        <para>Check for the correct renaming of webmail2 tables:</para>

        <itemizedlist>
          <listitem>
            <para>Access the database, e.g. with phpMyAdmin.</para>
          </listitem>
          <listitem>
            <para>The table names must now be <literal>mgw_webmail2_accounts</literal>, <literal>mgw_webmail2_messages</literal> and so forth instead of <literal>mgw_webmail_accounts</literal>, <literal>mgw_webmail_messages</literal>. In other words, <literal>webmail2</literal> must be used instead of <literal>webmail</literal>.</para>
          </listitem>
        </itemizedlist>
      </listitem>

      <listitem>
        <para>Check whether the emails in webmail2 have the new store
        path in the database:</para>

        <itemizedlist>
          <listitem>
            <para>Access the database, e.g. with phpMyAdmin.</para>
          </listitem>
          <listitem>
            <para>View the contents of the table <literal>mgw_webmail2_messages</literal>.</para>
          </listitem>
          <listitem>
            <para>The <literal>msg_body</literal> field must always begin with <literal>../../data_store/webmail2/</literal> (except for <filename>docu1.eml</filename> where it has to be <literal>docu/</literal>).</para>
          </listitem>
        </itemizedlist>
      </listitem>

      <listitem>
        <para>Now go to the Admin2 module and set the permissions for
        your users/groups for the modules. Important: the 'Access Module'
        permission.
        </para>
      </listitem>
      
      <listitem>
        <para>If all is up and running, you can safely delete the
          backup files and the SQL dump created in steps 1 and 2.
        </para>
      </listitem>
      
    </orderedlist>
    
    <para>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:
    </para>
    
    <para>
      <userinput>rm -ri moregroupware</userinput>
    </para>
    <para>
      <userinput>mv -i moregroupware.bak moregroupware</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p [dbname] &lt; mgw068.sql</userinput>
    </para>
    
  </section>

  <section id='appendix_upgrade_070'> 
    <title>Upgrading from 0.6.8/0.6.9 to 0.7.0</title>

    <para>Use the instructions for upgrading from 0.6.8 to 0.6.9 if you
    upgrade from 0.6.8.</para>

    <para>If you upgrade from 0.6.9 there is nothing to do except unpack the new
    files and call each module as admin to run the upgrade scripts.</para>
  </section>

  <section id='appendix_upgrade_071'> 
    <title>Upgrading from 0.7.0 to 0.7.1</title>

    <para>Here is what to do (Unix style, log in to server first):</para>
    
    <orderedlist>
      <listitem>
        <para>Backup your 0.7.0 directory!!!</para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>cp -R moregroupware moregroupware.bak</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Backup your database!!!</para>
        <para>
          <userinput>mysqldump --add-drop-table -a -u [user] -p [dbname] &gt; ~/mgw070.sql</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Get the new release from sourceforge.net.</para>
      </listitem>
      
      <listitem>
        <para>Delete everything in the more.groupware root folder
        except(!) <filename>data_store</filename>, <filename>data_cache</filename>,
        <filename>config.inc.php</filename> and
        <filename>templates_c</filename>.</para>
      </listitem>
      
      <listitem>
        <para>Unpack the new files from the archive(s).
        </para>
        <para>
          <userinput>cd /one/folder/above/moregroupware</userinput>
        </para>
        <para>
          <userinput>tar xzf moregroupware-0.7.1.tar.gz</userinput>
        </para>
      </listitem>
      
      <listitem>
        <para>Now edit <filename>config.inc.php</filename>.</para>

        <itemizedlist>
          <listitem>
            <para>Add this line (if not already present):</para>
            <programlisting><![CDATA[if ($appconf['rooturl'][strlen($appconf['rooturl'])-1]!='/') $appconf['rooturl'] .= '/';
define('ROOTURL', $appconf['rooturl']);]]>
            </programlisting>
          </listitem>
          <listitem>
            <para>Adjust the following lines to fit:</para>
            <programlisting><![CDATA[$appconf['mgw_version_number'] = '0.7.1';
$appconf['mgw_version'] = '0.7.1 - Interim / Update';]]>
            </programlisting>
          </listitem>
        </itemizedlist>

      </listitem>

      <listitem>
        <para>Open up your browser and log in to more.groupware as
        admin, the general module is updated automatically.</para>
        <para>Log in as admin again, the update for the overview
        module is done.</para>
      </listitem>

      <listitem>
        <para>If you run into trouble when logging in (error message
        about a missing column in mgw_news), manually change the URL in your
        browser's address bar to point to the news module. This will update
        the news module and the error should disappear.</para>
      </listitem>

      <listitem>
        <para>Now go to every installed module as admin to call the
        update procedure.</para>
      </listitem>

      <listitem>
        <para>If all is up and running, you can safely delete the
          backup files and the SQL dump created in steps 1 and 2.
        </para>
      </listitem>
      
    </orderedlist>
    
    <para>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:
    </para>
    
    <para>
      <userinput>rm -ri moregroupware</userinput>
    </para>
    <para>
      <userinput>mv -i moregroupware.bak moregroupware</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "DROP DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p -e "CREATE DATABASE [dbname]"</userinput>
    </para>
    <para>
      <userinput>mysql -u [user] -p [dbname] &lt; mgw070.sql</userinput>
    </para>
    
  </section>

</appendix>
