[turba] Updating the Turba Schema
lst_hoe02 at kwsoft.de
lst_hoe02 at kwsoft.de
Tue Sep 14 19:10:16 UTC 2010
Zitat von Simon Brereton <simon.brereton at dada.net>:
>> -----Original Message-----
>> From: turba-bounces at lists.horde.org [mailto:turba-
>
>
>> > And if a future version of Turba supported multiple email addresses
>> > for a contact (I'm using H3 (2.3.4)) what would happen to my
>> changes
>> > (I'd presume there'd be an updates .sql to run and that could
>> > effectively complicate the DB if not exactly breaking it)?
>> >
>> > Ideally you'll tell me there's a new version of Turba that supports
>> it
>> > (and therefore sync is supported as well) and I'll wait and just
>> > install that.
>> >
>> > Any information gratefully received.
>>
>> Maybe I misunderstand what you are asking, but Turba, itself, can
>> support as many email address fields as you want. You can configure
>> Turba to contain *any* field you want. What you need to do, as the
>> blog entry you linked to shows, is to add the field to your storage
>> backend e.g., create a database field named something like
>> object_homeemail, object_workemail. Then make sure the field has an
>> attribute entry in config/attributes.php. Turba ships with the
>> definitions already there for homeEmail and workEmail. Then, add
>> those two fields to the entry in config/backends.php (formally called
>> sources.php).
>>
>> Now, what the sync client sends is a different story. Looking at the
>> code in Turba_Driver#toHash, it looks like Turba expects the client
>> to send either a HOME or WORK type, then maps that to homeEmail and
>> workEmail. If neither of those get set, it then then looks for a
>> plain email value. So, if your client doesn't send the desired,
>> multiple emails as HOME and WORK, then we might have to look at
>> tweaking the code.
>
> Mike - I'll take another look at it. I meant to add the third
> option, that Turba already supported this and I hadn't seen it.
>
> However, I'm not sure I can agree that it does :) if I go into the
> DB Structure, turba_objects, there are:
>
> object_id owner_id object_type object_uid object_members object_firstname object_lastname object_middlenames object_nameprefix object_namesuffix object_alias object_photo object_phototype object_bday object_homestreet object_homepob object_homecity object_homeprovince object_homepostalcode object_homecountry object_workstreet object_workpob object_workcity object_workprovince object_workpostalcode object_workcountry object_tz object_geo object_email object_homephone object_workphone object_cellphone object_fax object_pager object_title object_role object_logo object_logotype object_company object_category object_notes object_url object_freebusyurl object_pgppublickey object_smimepublickey
>
> only one email. And indeed this is what is displayed for all my
> contacts - system wide. So it looks like I have to go down the hack
> route (unless there's a simple .sql I can run?). So, I'm a little
> perplexed, because I feel you should be right (searching on the
> topic didn't bring up a wealth of previous posts, so either this
> isn't a feature no one else needed *or* there's something not right
> with my set up. This, however, is a fresh install and not an
> upgrade - so I'm confused as to how I've ended up with only one
> email field.
The default is the most simple common use case. If you want more it's
all there without "hacking" the code. You only have to adjust your
config and add the database fields you like.
Be aware that for SyncML and Funambol you should use the latest Horde
Release because some bugs like http://bugs.horde.org/ticket/8571 have
been fixed lately.
Regards
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6046 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/turba/attachments/20100914/a1b2e9df/attachment-0001.bin>
More information about the turba
mailing list