Hi all,
Very new to all things sql, so please bear with me...
I performed the upgrade, and things were going well, until I got to the SQL commands I need to enter to upgrade the db schema...
The first few were successful, but I'm getting errors for a few of the commands...
1.
mysql> ALTER TABLE `contacts` ALTER `firstname` SET DEFAULT '';
ERROR 1054 (42S22): Unknown column 'firstname' in 'contacts'
2.
mysql> ALTER TABLE `contacts` ALTER `surname` SET DEFAULT '';
ERROR 1054 (42S22): Unknown column 'surname' in 'contacts'
3.
mysql> CREATE TABLE `contactgroups` (
-> `contactgroup_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
-> `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
-> `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
-> `del` tinyint(1) NOT NULL DEFAULT '0',
-> `name` varchar(128) NOT NULL DEFAULT '',
-> PRIMARY KEY(`contactgroup_id`),
-> CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`)
-> REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
-> INDEX `contactgroups_user_index` (`user_id`,`del`)
-> ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
ERROR 1005 (HY000): Can't create table 'roundcube.contactgroups' (errno: 150)
and
4.
mysql> CREATE TABLE `contactgroupmembers` (
-> `contactgroup_id` int(10) UNSIGNED NOT NULL,
-> `contact_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
-> `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
-> PRIMARY KEY (`contactgroup_id`, `contact_id`),
-> CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`)
-> REFERENCES `contactgroups`(`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE,
-> CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`)
-> REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE
-> ) /*!40000 ENGINE=INNODB */;
ERROR 1005 (HY000): Can't create table 'roundcube.contactgroupmembers' (errno: 150)
I know I probably just need to create the fields for the first two errors, and I'm thinking maybe the last line with the /*! stuff is causing the last two errors, but have no clue how to fix this...
Help!!!