Skip to content

Latest commit

 

History

History
388 lines (259 loc) · 13.6 KB

UPGRADING.rst

File metadata and controls

388 lines (259 loc) · 13.6 KB

Upgrading Turba

Contact: [email protected]

These are instructions to upgrade from earlier Turba versions. Please backup your existing data before running any of the steps described below. You can't use the updated data with your old Turba version anymore.

Upgrading Turba is as easy as running:

pear upgrade -a -B horde/turba

If you want to upgrade Turba with all binary dependencies, you need to remove the -B flag. Please note that this might also try to install PHP extensions through PECL that might need further configuration or activation in your PHP configuration:

pear upgrade -a horde/turba

If you want to upgrade to an alpha or beta version of Turba, you need to tell the PEAR installer to prefer non-stable package versions. Please note that this might also install pre-release 3rd-party PEAR packages:

pear -d preferred_state=alpha upgrade -a horde/turba

If you want to upgrade from a Turba version prior to 3.0, please follow the instructions in INSTALL to install the most recent Turba version using the PEAR installer.

After updating to a newer Turba version, you always need to update configurations and database schemes. Log in as an administrator, go to Administration => Configuration and update anything that's highlighted as outdated.

  • The "photo_orig" attribute has been added to store original versions of images that were resized. Any attribute of type "image" can be expanded to support this by also adding an attribute with the string "_orig" appended to the attribute name. If an entry does not contain any "photo" data, but does contain the "photo_orig" data, the "photo" data will automatically be populated with a resized version of the data (see Configuration changes).
  • The following options have been added:

    $conf['photos']['height']
    $conf['photos']['width']
    
  • addGroup

    This API method has been added.

  • Categories have been replaced by Tags. As such, you must update any local source definitions and remove the "Category" attribute.

The following options have been added:

$conf['tags']['enabled']
  • The "instantMessenger" attribute has been replaced by the "imaddress", "imaddress2", and "imaddress3" attributes.
  • The default SQL schema has been updated, as well as the out of the box field definitions for the 'localsql' source. You must execute the database migrations for Turba to ensure you have the latest schema.
  • The "gender" attribute sets values of (literally) "male" or "female" now, and no longer 0 or 1.
  • The "addressbooks" preference has been removed.
  • search

    The $sources, $fields, $matchBegin, $forceSource and $returnFields parameters have been removed and replaced by the $opts parameter.

    Added a 'rfc822Return' option to return a Horde_Mail_Rfc822_List object instead of the search results array (which remains the default).

Important

These upgrade instructions assume that you are upgrading from at least Turba 2.2. If you have an older version of Turba, you must upgrade to at least Turba 2.2 before attempting to install Turba 3.

The config/sources.php configuration file has been renamed to config/backends.php. The entry for defining the connection parameters for an SQL backend other than the default Horde backend has changed - see the 'params' -> 'sql' configuration value.

The _turba_hook_encode_{attribute} hook has been moved to the 'encode_attribute' hook.

The _turba_hook_decode_{attribute} hook has been moved to the 'decode_attribute' hook.

The SQL script for PostgreSQL used a wrong column type for the share tables. If you have many users or shares, this could cause an overrun at some point. Execute the provided SQL script to update your database if you are using the native SQL share driver on PostgresSQL:

psql <db name> < scripts/upgrades/2.3_to_2.3.3.pgsql.sql

Some fields in the SQL share driver tables have been changed. Execute the provided SQL script to update your database if you are using the native SQL share driver:

mysql --user=root --password=<MySQL-root-password>  <db name> < scripts/upgrades/2.2.1_to_2.3.sql

Examples for a few new fields have been added to config/attributes.php.dist and config/sources.php.dist. These field require Horde 3.3 or later though, so they are disabled by default. If you update your attributes.php and sources.php files and are using a sufficiently recent Horde version, you may want to uncomment those examples. These are the photo, phototype, logo, logotype, pgpPublicKey and smimePublicKey fields.

These are notes on upgrading from Turba 2.1.x to Turba 2.2.x.

Important

These upgrade instructions assume that you are upgrading from at least Turba 2.1. If you have an older version of Turba, follow the upgrade steps described in Upgrading to Turba 2.1 first.

The default database address book schema has been changed to better match other address book applications and to ease synchronization with those.

You can still use your old address book schema without any restrictions, but if you want to migrate existing address books to the new default scheme, you can use the provided upgrade script. This script assumes that you use the old default schema from Turba 2.1 and doesn't permanently change any data unless you edit it.

To run the script you have to open it in any text editor and change the three variables at the top of the script $db_user, $db_pass and $db_table to fit your current Turba installation. You can then run the script to see how the data //would// be changed:

php scripts/upgrades/2.1_to_2.2_sql_schema.php

If you are happy with the results, you can edit the script again and change the $for_real variable:

$for_real = true;

As always make sure you have a recent backup before running the script once more, this time the changes will be permanent. Don't forget to update your configuration files or to re-create them from the .php.dist examples.

A few advanced attribute definitions have been commented out in config/attributes.php by default because they require Horde 3.2 or later to be installed. If you have a sufficiently recent Horde version you can uncomment those lines in attributes.php.

As part of the new default schema, the various address fields have been split into individual fields (such as homeStreet, homeProvince etc...). If you still wish to display an individual composite address field (which will give you the map links) you must add a composite field (such as homeAddress). There is an example entry in the sources.php.dist file.

The new schema also uses the "phone" field type that has been introduced with Horde 3.2. If you still run earlier Horde versions, change the phone field types in attributes.php to anything that fits your needs, e.g "cellphone" or "text".

A new beta-level SQL Horde_Share driver has been added in Horde 3.2. This driver offers significant performance improvements over the existing Datatree driver but it has not received the same level of testing, thus the beta designation. In order to make use of this driver, you must be running Horde 3.2-RC3 or later. To add the new SQL tables for this driver, execute the sql script 2.1_to_2.2_add_sql_share_tables that is appropriate for your RDBMS. You then must execute the turba-convert-datatree-shares-to-sql upgrade script to migrate your existing share data.

Shared address books are now stored in a flat namespace in order to remove dependency on the hierarchal properties of the Horde_Share api. You must run the upgrade script scripts/upgrades/2007-06-17_flatten_shares.php.

Important

You must run these scripts BEFORE any user logs in to your upgraded installation to avoid the creation of any duplicate shares.

All user preferences related to address books will be checked and updated by Turba transparently during each user's first login after the update.

Additionally, if you are currently using the configuration setting, Name of Client Address Book and have it set to a share enabled source, you will most likely have to change the entry. The correct share key to enter here is the share name and can be found by browsing the datatree via the administration UI if using datatree shares, or by looking in the turba_shares table if using SQL based shares.

Share support has been added to the IMSP driver. This support requires at least a Horde 3.2 install. With this change, any IMSP address books the user has rights to will be represented internally as a Horde share. Permissions changed on the share will be reflected back to the IMSP server. If you set the configuration setting Name of source for creating new shares to imsp then any shares created by the user will result in a new IMSP address book being created on the IMSP server. Likewise, any IMSP address book deleted in Turba will be removed from the IMSP server.

To enable this support, make sure you are using at least Horde 3.2, set the use_shares attribute to true, and uncomment the IMSP _horde_hook_share_* functions in horde/config/hooks.php.

With this change, the IMSP Address Book Administration option page has been removed, as the creation/deletion of address books is now handled with shares.

Important

IMSP contacts contained in contact groups that are not from an IMSP source may not be visible within that group when migrating an IMSP source to a share.

All hooks that are specific to Turba have been moved from the horde/config/hooks.php file. Move your existing Turba Hooks from there to turba/config/hooks.php.

These are notes on upgrading from Turba 2.0.x to Turba 2.1.

Important

These upgrade instructions assume that you are upgrading from at least Turba 2.0. If you have an older version of Turba, get a copy of Turba 2.0 and follow the upgrade steps described there first.

Synchronization with SyncML capable devices is possible now if you have at least Horde 3.1. You need to create a History backend with horde/scripts/sql/horde_histories.sql to allow synchronization. You also need to create default history entries for existing contacts by running the script scripts/upgrades/create_default_histories.php.

The _turba_hook_encode_{attribute} and _turba_hook_decode_{attribute} functions are now passed an additional parameter - the object that is being loaded/saved. This enables you to create more powerful custom hooks that build a field from several other field's values (the opposite of composite fields), or otherwise modify a value based on other properties of the object.

Share support has been added to Turba. This allows the sharing, adding, and deleting of addressbooks for those sources that support it. Currently, this is supported by the SQL driver. With this change, the public attribute of the params array has been removed in favor of the use_share attribute. If you are currently using a SQL source as a public source, you must run the upgrade script turba-public-to-horde-share. Be sure to read the script comments and backup all data before conversion. This script will create a new share that is viewable by all users. If you choose not to use shares, set the use_shares attribute to false and the SQL driver will behave as in previous versions, that is, a seperate, private addressbook for each user.

Important

If you are currently using two seperate turba_objects tables - one for personal address books and one for a public address book, you should run the upgrade script on the public table, then merge the public table into the private table and enable share support on the private table. There is no longer any need for maintaining the two seperate tables. If you desire not to enable share support, you may still use seperate tables and set permissions via the administration interface.