Roundcube Community Forum

 

database table field modifications

Started by cirrusflyer, August 06, 2006, 08:12:56 PM

Previous topic - Next topic

cirrusflyer

I had to allow NULL on a couple fields in the identities and contacts tables, otherwise I would get errors. U'm using MySQL5 and this is a fresh install of this latest beta and I used the MySQL5 sql initial sql script.

anyone else see this?

bpat1434

Mine worked fine.... which fields did you have to allow NULL in?
 
 

cirrusflyer

Mine worked too - sort of - couldn't add contacts and ny identity wasn't created automatically the first time I logged in. The error log pointed to what I corrected:

allowed NULL on:

contacts table - firstname, surname, vcard
identities table - organization, reply-to, bcc, signature

bpat1434

Hmmm.... my identities table was fine. And I updated my identity after logging in too.

Contacts, not sure. I haven't added any yet (that's what my Palm is for).
 
 

Xenos

In fact problem should occured on all 'TEXT' type field which are defined as NOT NULL in the creation script without
specifying a DEFAULT value.

Thats a behaviour or MySql5 + PHP5 which doesn't default to empty string on TEXT or LONGTEXT fields.

This problem will raise an error for exemple if you try to insert a new contact (VCARD field is not defined)
Same in identities.

The fix could be to allow null on such fields, especially if you are not sure to set a value to it :)


jfk

Same problem here. I changed the sql scripts mysql.initial.sql, mysql.update.sql, mysql5.initial.sql as in  http://trac.roundcube.net/changeset/1509

I also had to modify the contacts table to allow users to be added when clicking on the
  • next to a name in the header when displaying an email. I changed the firstname and surname to allow nulls.