[turba] MySQL script to upgrade Turba 1.0/1.1 schema to 1.2

Jeff Gilchrist jsgilchrist at hotmail.com
Sun Mar 9 10:03:51 PST 2003


It seems a number of people have been asking how to upgrade the SQL database 
schema from the 1.0/1.1 format to the new 1.2 format in MySQL.  I have 
written a script that will do just that.  I tried it on my own system after 
upgrading to Turba 1.2-RC4 and it seems to be working fine.

You can download the script from here:
http://gilchrist.ca/jeff/mysql_upgrade_1.1_to_1.2.sql

If you want to learn more about the SQL commands that the script uses, check 
you this MySQL help page:
http://www.mysql.com/doc/en/ALTER_TABLE.html

Here are the contents of the script:

-- You can simply execute this file in your database.
-- If you already have Turba 1.0 or 1.1 installed, use this script to
-- upgrade your MySQL database to the new Turba 1.2 schema
--
-- Run as:
--
-- $ mysql --user=root --password=<MySQL-root-password> < 
mysql_upgrade_1.1_to_1.2.sql

USE horde;

ALTER TABLE turba_objects CHANGE object_homeAddress object_homeaddress 
VARCHAR(255);

ALTER TABLE turba_objects CHANGE object_workAddress object_workaddress 
VARCHAR(255);

ALTER TABLE turba_objects CHANGE object_homePhone object_homephone 
VARCHAR(25);

ALTER TABLE turba_objects CHANGE object_workPhone object_workphone 
VARCHAR(25);

ALTER TABLE turba_objects CHANGE object_cellPhone object_cellphone 
VARCHAR(25);

ALTER TABLE turba_objects MODIFY object_title VARCHAR(255);

ALTER TABLE turba_objects MODIFY object_company VARCHAR(255);

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

ALTER TABLE turba_objects ADD object_members BLOB;

CREATE INDEX turba_owner_idx ON turba_objects (owner_id);

GRANT SELECT, INSERT, UPDATE, DELETE ON turba_objects TO horde;


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail



More information about the turba mailing list