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!
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.
Warning | |
---|---|
You will loose your settings and rights adjustments, sorry! There were some substantial changes to the database structure this time. |
Note | |
---|---|
After the upgrade you will get errors like Unknown column 'c.configtagid'. These are not caused by the update, but are bugs in some parts of the code. You should upgrade to a newer version. |
Here is what to do (Unix style, log in to server first):
Backup your 0.6.3 directory!!!
cp -R moregroupware moregroupware.bak
Backup your database!!!
mysqldump --add-drop-table -a -u [user] -p [dbname] > mgw063.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_4pl1.tar.gz
Clean the database now, using the SQL shown below.
mysql -u [user] -p [dbname] < clean.sql
Here is the SQL mentioned above:
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;
Go through the usual setup process now. We will restore your data later.
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] < mgw063.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] < mgw063-mgw064.sql
Here is the SQL mentioned above:
## 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';
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 [dbname] < mgw063.sql