[turba] Upgrading from Turba 1.2 to 2.0

Brett Charbeneau brett at wrl.org
Thu Jul 6 08:04:26 PDT 2006


 	This is a complete rundown on the steps I've taken to move from an 
existing Horde 2.2.3 install to a temporary development server running Horde 
3.0.4. Here are the specifics:

Horde: 2.2.3    (runing on RedHat 9.0)
IMP: 3.2.2
Turba: 1.2
PHP Version: 4.2.2

to

Horde: 3.0.4    (running on Debian 3.1)
IMP: 4.0.2
Turba: 2.0.2

__
NOTE: the old RH installation started with Turba 1.1 and updated to 1.2 - this 
creates some goofiness, notably two missing database fields (object_type and 
object_members) and in the owner_id field, the hostname has been appended to the 
username. More on this later...
__

First, I went ahead and added the two missing fields to my Turba 1.2 database 
with these commands:

ALTER TABLE turba_objects ADD object_type VARCHAR(255) NOT NULL DEFAULT 
'Object';

ALTER TABLE turba_objects ADD object_members BLOB;


Next, I copied from my old installation the old horde mysql create script 
"mysql_create.sql" found in

 	horde-2.2.3/scripts/db/mysql_create.sql

and create turba_object script "mysql_create.sql" found in

 	turba-1.2/scripts/drivers/mysql_create.sql

to the new installation machine and used these to create the initial empty horde
and turba database:

 	mysql --user=root --password=PASSWORD < \
 	horde-2.2.3/scripts/db/mysql_create.sql

 	mysql --user=root --password=PASSWORD < \
 	turba-1.2/scripts/drivers/mysql_create.sql

Next, I go to the old install and dump the present Horde database:

 	mysqldump -t horde --password=PASSWORD > oldHORDE.txt

Next, I go to the old install and dump the present Turba database:

 	mysqldump -t horde turba_objects --password=PASSWORD > oldTURBA.txt

Then I FTP'd those files over to the new install. Like Howard Moscovitz noted in 
his post on the 4th, my object_id fields had the hostname appended to the 
username. I pulled my oldTURBA.txt file up into vi and did a global search and 
replace to remove the "@hostname" in these fields.

Next I restored the old Horde and Turba data:

 	mysql --user=root --password=PASSWORD horde < oldHORDE.txt
 	mysql --user=root --password=PASSWORD horde < oldTURBA.txt

Next I updated the horde database and turba_objects table with the NEW update
script on the new server:

 	mysql --user=root --password=PASSWORD horde <
 	/usr/share/doc/horde3/examples/scripts/upgrades/2.2_to_3.0.mysql.sql

 	mysql --user=root --password=PASSWORD horde < \
 	/usr/share/doc/turba2/examples/scripts/upgrades/1.2_to_2.0.mysql.sql


Now when I try to access "My Addressbook" on the new server I'm only seeing a 
part of the two first entries, and my horde3.log file has this error in it:

** Unknown column 'object_uid' in 'field list'] [on line 143 of 
"/usr/share/horde3/turba/lib/Driver/sql.php"]

 	I see 'object_uid' in sources.php for turba, but I'm confused as to 
where the error is coming from or where 'object_uid' actually lives since it's 
not in my Turba database.
 	Below, please find the results of an EXPLAIN command on this table:


mysql> EXPLAIN turba_objects;
+--------------------+--------------+------+-----+---------+-------+
| Field              | Type         | Null | Key | Default | Extra |
+--------------------+--------------+------+-----+---------+-------+
| object_id          | varchar(32)  |      | PRI |         |       |
| owner_id           | varchar(255) |      | MUL |         |       |
| object_type        | varchar(255) |      |     | Object  |       |
| object_members     | blob         | YES  |     | NULL    |       |
| object_name        | varchar(255) | YES  |     | NULL    |       |
| object_alias       | varchar(32)  | YES  |     | NULL    |       |
| object_email       | varchar(255) | YES  |     | NULL    |       |
| object_homeaddress | varchar(255) | YES  |     | NULL    |       |
| object_workaddress | varchar(255) | YES  |     | NULL    |       |
| object_homephone   | varchar(25)  | YES  |     | NULL    |       |
| object_workphone   | varchar(25)  | YES  |     | NULL    |       |
| object_cellphone   | varchar(25)  | YES  |     | NULL    |       |
| object_fax         | varchar(25)  | YES  |     | NULL    |       |
| object_title       | varchar(255) | YES  |     | NULL    |       |
| object_company     | varchar(255) | YES  |     | NULL    |       |
| object_notes       | text         | YES  |     | NULL    |       |
+--------------------+--------------+------+-----+---------+-------+
16 rows in set (0.00 sec)


-- 
********************************************************************
Brett Charbeneau
Network Administrator
Williamsburg Regional Library
7770 Croaker Road
Williamsburg, VA 23188-7064
(757)259-4044          www.wrl.org
(757)259-4079 (fax)    brett at wrl.org
********************************************************************



More information about the turba mailing list