2008-05-14, 11:50 PM
Hi there, first of all I was directed to this website from a link in a tutorial on www.bestofJoomla.com which is a support forum for fireboard. The link pointed to a tutorial about myPHPadmin one of your members wrote. Basically, this is where my problem lies. I am trying to upgrade to the latest version of fireboard and have got as far as putting the SQL script in the upgrade into myPHPadmin. I first practised on a test website and it worked perfectly okay. The thing was, I had installed the old version of a forum and it didn't have any entries, apart from one.. Now I am trying to upgrade a forum that has got entries, problems are arising. When I put the script in and press go, I keep getting SQL error messages. What I need to know is what will I do to the additional script, do I have to delete some of it. I have pasted in the script, and at the bottom is an error message that comes up. You may well ask why I am asking the question on here, and not on the fireboard forum. Well it is simple, I am hope in the support is better on here than it is on the fireboard forum.
The error message is below
/* Alter table in Second database */
alter table `jos_fb_attachments`
add KEY `mesid`(`mesid`), COMMENT='';
/* Alter table in Second database */
alter table `jos_fb_categories`
add column `headerdesc` text NOT NULL after `description`,
add column `class_sfx` varchar(20) NOT NULL after `headerdesc`,
add column `id_last_msg` int(10) NOT NULL DEFAULT '0' after `class_sfx`,
add column `numTopics` mediumint(8) NOT NULL DEFAULT '0' after `id_last_msg`,
add column `numPosts` mediumint(8) NOT NULL DEFAULT '0' after `numTopics`,
add column `time_last_msg` int(11) NULL after `numPosts`,
drop key `catid`,
drop key `catparent`,
add KEY `msg_id`(`id_last_msg`),
add KEY `parent`(`parent`),
add PRIMARY KEY(`id`),
add KEY `published_pubaccess_id`(`published`,`pub_access`,`id`), COMMENT='';
/* Create table in Second database */
create table `jos_fb_groups`(
`id` int(4) NOT NULL auto_increment ,
`title` varchar(255) NULL ,
PRIMARY KEY (`id`)
);
/* Alter table in Second database */
alter table `jos_fb_messages`
add column `modified_by` int(7) NULL after `moved`,
add column `modified_time` int(11) NULL after `modified_by`,
add column `modified_reason` tinytext NULL after `modified_time`,
add KEY `hold_time`(`hold`,`time`),
drop key `id`,
add KEY `locked`(`locked`),
add KEY `time`(`time`), COMMENT='';
/* Alter table in Second database */
alter table `jos_fb_messages_text`
drop key `mesid`,
add PRIMARY KEY(`mesid`), COMMENT='';
/* Alter table in Second database */
alter table `jos_fb_moderation`
drop key `catid`, COMMENT='';
/* Create table in Second database */
create table `jos_fb_ranks`(
`rank_id` mediumint(8) unsigned NOT NULL auto_increment ,
`rank_title` varchar(255) NOT NULL ,
`rank_min` mediumint(8) unsigned NOT NULL DEFAULT '0' ,
`rank_special` tinyint(1) unsigned NOT NULL DEFAULT '0' ,
`rank_image` varchar(255) NOT NULL ,
PRIMARY KEY (`rank_id`)
);
/* Alter table in Second database */
alter table `jos_fb_users`
add column `group_id` int(4) NULL DEFAULT '1' after `karma_time`,
add column `uhits` int(11) NULL DEFAULT '0' after `group_id`,
add column `personalText` tinytext NULL after `uhits`,
add column `gender` tinyint(4) NOT NULL DEFAULT '0' after `personalText`,
add column `birthdate` date NOT NULL DEFAULT '0000-00-00' after `gender`,
add column `location` varchar(50) NULL after `birthdate`,
add column `ICQ` varchar(50) NULL after `location`,
add column `AIM` varchar(50) NULL after `ICQ`,
add column `YIM` varchar(50) NULL after `AIM`,
add column `MSN` varchar(50) NULL after `YIM`,
add column `SKYPE` varchar(50) NULL after `MSN`,
add column `hideEmail` tinyint(1) NOT NULL DEFAULT '1' after `SKYPE`,
add column `showOnline` tinyint(1) NOT NULL DEFAULT '1' after `hideEmail`,
add column `rank` tinyint(4) NOT NULL DEFAULT '0' after `showOnline`,
add column `GTALK` varchar(50) NULL after `rank`,
add column `websitename` varchar(50) NULL after `GTALK`,
add column `websiteurl` varchar(50) NULL after `websitename`,
add KEY `group_id`(`group_id`), COMMENT='';
/* Alter table in Second database */
alter table `jos_fb_whoisonline`
add KEY `userid`(`userid`), COMMENT='';
INSERT INTO `jos_fb_groups` VALUES ('1', 'Registered User');
INSERT INTO `jos_fb_ranks` (`rank_id`, `rank_title`, `rank_min`, `rank_special`, `rank_image`) VALUES
(1, 'Fresh Boarder', 0, 0, 'rank1.gif'),
(2, 'Junior Boarder', 20, 0, 'rank2.gif'),
(3, 'Senior Boarder', 40, 0, 'rank3.gif'),
(4, 'Expert Boarder', 80, 0, 'rank4.gif'),
(5, 'Gold Boarder', 160, 0, 'rank5.gif'),
(6, 'Platinum Boarder', 320, 0, 'rank6.gif'),
(7, 'Administrator', 0, 1, 'rankadmin.gif'),
(8, 'Moderator', 0, 1, 'rankmod.gif'),
(9, 'Spammer', 0, 1, 'rankspammer.gif');
UPDATE `jos_fb_users` SET `rank`=8 WHERE `moderator`=1 AND `rank`=0;
The error message is below
Quote:SQL query:
/* Alter table in Second database */ ALTER TABLEjos_fb_attachments
ADD KEYmesid
(mesid
) ,
COMMENT = '';
MySQL said: Documentation
#1061 - Duplicate key name 'mesid'