Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0003230SOGoPackaging (Debian)public2016-04-13 17:52
Reporterfrancbelge Assigned Toplevesque  
Status resolvedResolutionfixed 
Platform[Server] LinuxOSDebianOS Version7 (Wheezy)
Fixed in Versionnightly v2 
Summary0003230: Post-installation should run database migration script

When updating sogo from 2.2.17a to 2.3, calendars do not display in the web interface anymore and caldav access is denied because of changes to the database schema. Database migration scripts sql-update-2.1.17_to_2.3.0[-mysql].sql should be launched automatically or a message should let the administrator know that a manual migration is necessary.

Steps To Reproduce

Update from 2.2.17a to 2.3 with apt-get or aptitude.

TagsNo tags attached.


has duplicate 0001043 resolvedludovic SOGo Ubuntu package does not advise schema update 
related to 0003053 resolvedplevesque is not executable 




2015-06-03 13:17

reporter   ~0008562

I have the same problem.



2015-06-03 13:19

reporter   ~0008563

Quick note: manually running the migration script after the installation fixes the calendar issue.



2015-06-03 13:46

reporter   ~0008566

Is there anything else I have to do before running the script?
Stop some services etc?
Or should I just execute script?



2015-06-03 13:48

administrator   ~0008567

Just run the script. It is mentioned in the upgrade instructions - both in the guide and in the annonce message. We will most likely never automate this process.



2015-06-03 14:38

reporter   ~0008570

I ran script, got error:

2015-06-03 17:31:11.940 sogo-tool[16657] ERROR(+[GCSFolderManager defaultFolderManager]): default 'OCSFolderInfoURL' is not configured.
Couldn't fetch OCSFolderInfoURL value, aborting

changed update script to this:

indextable=$(sogo-tool dump-defaults -f /home/sogo/GNUstep/Defaults/.GNUstepDefaults | awk -F\" '/ OCSFolderInfoURL =/ {print $2}' | awk -F/ '{print $NF}')
if [ -z "$indextable" ]; then
echo "Couldn't fetch OCSFolderInfoURL value, aborting" >&2

My GNUstepDeafults file:


What am I missing?



2015-06-03 15:00

reporter   ~0008571

sudo -u sogo sogo-tool dump-defaults
OCSFolderInfoURL = "mysql://sogo:tormsogosql@localhost:3306/sogo/sogo_folder_info";
OCSSessionsFolderURL = "mysql://sogo:tormsogosql@localhost:3306/sogo/sogo_session_folder";



2015-06-03 15:06

reporter   ~0008572

An alternative would be to display upgrade instructions during apt-get upgrade, especially when a specific migration operation is required.



2015-06-04 15:24

reporter   ~0008583

One step forward and another error:

sudo -u sogo sh

Username (sogo): sogo
Hostname (
Database (sogo): sogo 41: Syntax error: "(" unexpected

line 41:

function adjustSchema() {
IFS=" "
part1="echo -e \&quot;ALTER TABLE $table MODIFY c_partstates mediumtext;\\n\&quot;";
part2="echo -e \&quot;ALTER TABLE $table ADD COLUMN c_description mediumtext;\\n\&quot;";



2015-06-04 15:32

reporter   ~0008584

Next error:

Username (sogo): root
Hostname ( localhost
Database (sogo): sogo
This script will ask for the sql password twice
Converting c_partstates from VARCHAR(255) to mediumtext in calendar quick tables
Enter password:
Enter password:
ERROR 1060 (42S21) at line 1: Duplicate column name 'c_description'



2015-06-08 07:04

reporter   ~0008592

Was able to update my database. So this topic can be closed.



2015-06-10 14:07

reporter   ~0008613

Same problem on automatic upgrade on Ubuntu system.

sudo -u sogo sogo-tool dump-defaults does display
OCSFolderInfoURL = "mysql://sogo:xxxxxxx@localhost:3306/sogo/sogo_folder_info";
OCSSessionsFolderURL = "mysql://sogo:xxxxxxxxx@localhost:3306/sogo/sogo_sessions_folder";

sudo -u sogo bash

fails with: "Couldn't fetch OCSFolderInfoURL value, aborting"


2015-06-10 14:12

reporter   ~0008614

I have exactly the same problem.

Anyone has suggestion?



2015-06-11 09:35

reporter   ~0008618

I've tracked down the problem to the assumption that /etc/sogo/sogo.conf contains the defaults for the current installation. Ubuntu does not and it has not changed this with previous upgrades.

While the upgrade notes for 2.0.5 provide instructions for this transition, I am hesitant to follow all these notes as Ubuntu seems to follow its own set of conventions regarding the placement of some settings files.

My guess is that one alteration is needed to those instructions. The final instruction should be changed from

sudo -u sogo mv ~/GNUstep/Defaults/.GNUstepDefaults \


sudo -u sogo mv /var/lib/sogo/GNUstep/Defaults/.GNUstepDefaults \

So, is there someone from the Ubuntu package group who can confirm the steps are for Ubuntu to move to a set of defaults in /etc/sogo/ ?



2015-06-11 20:04

reporter   ~0008627

Last edited: 2015-06-11 20:11

I managed to get past the "Couldn't fetch OCSFolderInfoURL value, aborting" error with the tip above. But when I try to run the script now, everytime I get 41: Syntax error: "(" unexpected

This is NOT an Ubuntu box btsihw, but a Debian 7 box.

@raido: you said you were able to update your database. Care to share with the class how you managed that? :)

@ludovic: I think that the severity should be upgraded, this affects quite a lot of people and a large portion of SOGo is now unuseable for the people affected!



2015-06-13 02:36

reporter   ~0008632

I bit the bullet, and it seems to have worked on my Ubuntu machine.

I ran the upgrade instructions for 2.0.5 as root, changing the rename line as noted in my post #8618 above (

I was then able to run the update script for 2.3. (I did move the sample settings in /etc/sogo/ first, so you may need to do that too.)




2015-06-14 08:34

reporter   ~0008634

Debian7: Move /etc/sogo/sogo.conf out or remove "-f /etc/sogo/sogo.conf" from the script.

I run the script by sogo user, but had to change "sogo-tool" to "/usr/sbin/sogo-tool".



2015-06-15 09:51

reporter   ~0008641

Since I just upgrade to 2.3.0 I will try to add some clarifiying comments to some of the problems above:

Comment #8618:

In current ubuntu package (sogo-2.3.0-1) /etc/sogo.conf is included in the package. So it should be safe to perform the documented upgrade procedure to move configuration to sogo.conf.

Comments #8583 and #8627:

The syntax error '"(" unexpected ...' occurs if the script is executed with another interpreter than bash. Ubuntu uses dash by default which uses another function declaration syntax (see for more information). Try executing "bash" instead of "sh". Otherwise you have to remove the "function" keyword (and probably have to edit the escape sequences in echo expressions as well).



2015-06-15 19:36

reporter   ~0008647

Comment #8572
An alternative would be to display upgrade instructions during apt-get upgrade, especially when a specific migration operation is required.

This would be in my opinion expected behavior and would have saved us from the (calendar) downtime and the trouble attached to that.



2015-10-08 15:05

reporter   ~0008981

My Workaround for Ubuntu/Debian was to execute following after the upgrade:

chown -R sogo /etc/sogo
sudo -u sogo sogo-tool dump-defaults > /etc/sogo/sogo.conf
sudo -u sogo /usr/doc/sogo/sql-update-2.1.17_to_2.3.0[-mysql].sh



2016-04-13 17:51

reporter   ~0009976

Installation/upgrade of binary packages from now on will show an on-screen note to remind the system maintainer to check for database schema upgrades.

Already included in nightly builds; will be part of the next set of releases for v2 and v3.

Issue History

Date Modified Username Field Change
2015-06-03 11:47 francbelge New Issue
2015-06-03 13:17 Raido Note Added: 0008562
2015-06-03 13:19 francbelge Note Added: 0008563
2015-06-03 13:46 Raido Note Added: 0008566
2015-06-03 13:48 ludovic Note Added: 0008567
2015-06-03 13:48 ludovic Severity major => feature
2015-06-03 14:38 Raido Note Added: 0008570
2015-06-03 15:00 Raido Note Added: 0008571
2015-06-03 15:06 francbelge Note Added: 0008572
2015-06-04 15:24 Raido Note Added: 0008583
2015-06-04 15:32 Raido Note Added: 0008584
2015-06-08 07:04 Raido Note Added: 0008592
2015-06-10 14:07 penguinpreferred Note Added: 0008613
2015-06-10 14:12 Note Added: 0008614
2015-06-11 09:35 penguinpreferred Note Added: 0008618
2015-06-11 20:04 angelus1969 Note Added: 0008627
2015-06-11 20:06 angelus1969 Note Edited: 0008627
2015-06-11 20:11 angelus1969 Note Edited: 0008627
2015-06-13 02:36 penguinpreferred Note Added: 0008632
2015-06-14 08:34 jackc Note Added: 0008634
2015-06-15 09:51 Sven Note Added: 0008641
2015-06-15 19:36 kabelschachtrobbe Note Added: 0008647
2015-10-08 15:05 ThomasS Note Added: 0008981
2016-04-01 15:00 ludovic Relationship added has duplicate 0001043
2016-04-01 15:02 ludovic Assigned To => plevesque
2016-04-01 15:02 ludovic Status new => assigned
2016-04-01 15:03 ludovic Relationship added related to 0003053
2016-04-13 17:51 plevesque Note Added: 0009976
2016-04-13 17:52 plevesque Status assigned => resolved
2016-04-13 17:52 plevesque Fixed in Version => nightly v2
2016-04-13 17:52 plevesque Resolution open => fixed