News:

Wondering if this will always be free?  See why free is better.

Main Menu

Stuck in 1 last problem

Started by vrsicks, October 20, 2008, 02:50:04 PM

Previous topic - Next topic

vrsicks

I'm converting from IPB 2.1.7 to SMF 1.1.6
until the last process (i guess)
it's shown this msg

Converting permissions... Unsuccessful!
This query:
INSERT INTO 4rum.4rum_membergroups
(ID_GROUP, groupName, maxMessages, onlineColor, stars)
VALUES
(6 + 3, SUBSTRING('Administrators', 1, 255), 50, '', '');
Caused the error:
Duplicate entry '9' for key 1

where to fix it? and how?
thanks in advance

ThorstenE

you need to edit the invision21_to_smf.sql

find:convert_query("
INSERT INTO {$to_prefix}membergroups
(ID_GROUP, groupName, maxMessages, onlineColor, stars)
VALUES
($row[ID_GROUP] + 3, SUBSTRING('$row[groupName]', 1, 255), $row[maxMessages], '', '')");
$groupID = $row['ID_GROUP'] + 3;


replace it with:
convert_query("
INSERT IGNORE INTO {$to_prefix}membergroups
(ID_GROUP, groupName, maxMessages, onlineColor, stars)
VALUES
($row[ID_GROUP] + 3, SUBSTRING('$row[groupName]', 1, 255), $row[maxMessages], '', '')");
$groupID = $row['ID_GROUP'] + 3;


I changed the INSERT to INSERT IGNORE .. so it should skip duplicates for this step.

Advertisement: