-- $Horde: turba/scripts/drivers/mysql_upgrade_1.1_to_1.2.sql,v 1.1.2.1 2003/03/09 16:34:21 jan Exp $
-- 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);
