Author Topic: database table field modifications  (Read 4862 times)

Offline cirrusflyer

  • Jr. Member
  • **
  • Posts: 12
database table field modifications
« on: August 06, 2006, 08:12:56 PM »
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?

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: database table field modifications
« Reply #1 on: August 06, 2006, 11:30:53 PM »
Mine worked fine.... which fields did you have to allow NULL in?
 
  

Offline cirrusflyer

  • Jr. Member
  • **
  • Posts: 12
Re: database table field modifications
« Reply #2 on: August 07, 2006, 08:45:51 AM »
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

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: database table field modifications
« Reply #3 on: August 07, 2006, 08:50:25 AM »
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).
 
  

Offline Xenos

  • Newbie
  • *
  • Posts: 1
Re: database table field modifications
« Reply #4 on: November 16, 2006, 07:54:25 AM »
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 :)


Offline jfk

  • Newbie
  • *
  • Posts: 1
database table field modifications
« Reply #5 on: July 30, 2008, 05:33:34 PM »
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.